Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
d8c4f6a0
Commit
d8c4f6a0
authored
Apr 04, 2013
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make Data_Make_Struct a statement to make it C99 compatible
parent
75f5535c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
include/mruby/data.h
include/mruby/data.h
+5
-5
No files found.
include/mruby/data.h
View file @
d8c4f6a0
...
...
@@ -28,11 +28,11 @@ struct RData *mrb_data_object_alloc(mrb_state *mrb, struct RClass* klass, void *
#define Data_Wrap_Struct(mrb,klass,type,ptr)\
mrb_data_object_alloc(mrb,klass,ptr,type)
#define Data_Make_Struct(mrb,klass,strct,type,sval,data)
(
\
sval = mrb_malloc(mrb, sizeof(strct))
,
\
{ static const strct zero = { 0 }; *sval = zero; }
,
\
data = Data_Wrap_Struct(mrb,klass,type,sval)\
)
#define Data_Make_Struct(mrb,klass,strct,type,sval,data)
do {
\
sval = mrb_malloc(mrb, sizeof(strct))
;
\
{ static const strct zero = { 0 }; *sval = zero; }
;
\
data = Data_Wrap_Struct(mrb,klass,type,sval)
;
\
} while (0
)
#define RDATA(obj) ((struct RData *)((obj).value.p))
#define DATA_PTR(d) (RDATA(d)->data)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment