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
0249e7dd
Commit
0249e7dd
authored
Jun 05, 2014
by
cremno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mruby-struct: internal linkage for all functions
parent
9763726e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
mrbgems/mruby-struct/src/struct.c
mrbgems/mruby-struct/src/struct.c
+12
-12
No files found.
mrbgems/mruby-struct/src/struct.c
View file @
0249e7dd
...
@@ -40,13 +40,13 @@ struct_ivar_get(mrb_state *mrb, mrb_value c, mrb_sym id)
...
@@ -40,13 +40,13 @@ struct_ivar_get(mrb_state *mrb, mrb_value c, mrb_sym id)
}
}
}
}
mrb_value
static
mrb_value
mrb_struct_iv_get
(
mrb_state
*
mrb
,
mrb_value
c
,
const
char
*
name
)
mrb_struct_iv_get
(
mrb_state
*
mrb
,
mrb_value
c
,
const
char
*
name
)
{
{
return
struct_ivar_get
(
mrb
,
c
,
mrb_intern_cstr
(
mrb
,
name
));
return
struct_ivar_get
(
mrb
,
c
,
mrb_intern_cstr
(
mrb
,
name
));
}
}
mrb_value
static
mrb_value
mrb_struct_s_members
(
mrb_state
*
mrb
,
mrb_value
klass
)
mrb_struct_s_members
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
{
mrb_value
members
=
struct_ivar_get
(
mrb
,
klass
,
mrb_intern_lit
(
mrb
,
"__members__"
));
mrb_value
members
=
struct_ivar_get
(
mrb
,
klass
,
mrb_intern_lit
(
mrb
,
"__members__"
));
...
@@ -60,7 +60,7 @@ mrb_struct_s_members(mrb_state *mrb, mrb_value klass)
...
@@ -60,7 +60,7 @@ mrb_struct_s_members(mrb_state *mrb, mrb_value klass)
return
members
;
return
members
;
}
}
mrb_value
static
mrb_value
mrb_struct_members
(
mrb_state
*
mrb
,
mrb_value
s
)
mrb_struct_members
(
mrb_state
*
mrb
,
mrb_value
s
)
{
{
mrb_value
members
=
mrb_struct_s_members
(
mrb
,
mrb_obj_value
(
mrb_obj_class
(
mrb
,
s
)));
mrb_value
members
=
mrb_struct_s_members
(
mrb
,
mrb_obj_value
(
mrb_obj_class
(
mrb
,
s
)));
...
@@ -109,7 +109,7 @@ mrb_struct_members_m(mrb_state *mrb, mrb_value obj)
...
@@ -109,7 +109,7 @@ mrb_struct_members_m(mrb_state *mrb, mrb_value obj)
return
mrb_struct_s_members_m
(
mrb
,
mrb_obj_value
(
mrb_obj_class
(
mrb
,
obj
)));
return
mrb_struct_s_members_m
(
mrb
,
mrb_obj_value
(
mrb_obj_class
(
mrb
,
obj
)));
}
}
mrb_value
static
mrb_value
mrb_struct_getmember
(
mrb_state
*
mrb
,
mrb_value
obj
,
mrb_sym
id
)
mrb_struct_getmember
(
mrb_state
*
mrb
,
mrb_value
obj
,
mrb_sym
id
)
{
{
mrb_value
members
,
slot
,
*
ptr
,
*
ptr_members
;
mrb_value
members
,
slot
,
*
ptr
,
*
ptr_members
;
...
@@ -162,7 +162,7 @@ static mrb_value (*const ref_func[])(mrb_state*, mrb_value) = {
...
@@ -162,7 +162,7 @@ static mrb_value (*const ref_func[])(mrb_state*, mrb_value) = {
mrb_struct_ref9
,
mrb_struct_ref9
,
};
};
mrb_sym
static
mrb_sym
mrb_id_attrset
(
mrb_state
*
mrb
,
mrb_sym
id
)
mrb_id_attrset
(
mrb_state
*
mrb
,
mrb_sym
id
)
{
{
const
char
*
name
;
const
char
*
name
;
...
@@ -219,14 +219,14 @@ mrb_struct_set_m(mrb_state *mrb, mrb_value obj)
...
@@ -219,14 +219,14 @@ mrb_struct_set_m(mrb_state *mrb, mrb_value obj)
#define is_notop_id(id) (id)
/* ((id)>tLAST_TOKEN) */
#define is_notop_id(id) (id)
/* ((id)>tLAST_TOKEN) */
#define is_local_id(id) (is_notop_id(id))
/* &&((id)&ID_SCOPE_MASK)==ID_LOCAL) */
#define is_local_id(id) (is_notop_id(id))
/* &&((id)&ID_SCOPE_MASK)==ID_LOCAL) */
int
static
int
mrb_is_local_id
(
mrb_sym
id
)
mrb_is_local_id
(
mrb_sym
id
)
{
{
return
is_local_id
(
id
);
return
is_local_id
(
id
);
}
}
#define is_const_id(id) (is_notop_id(id))
/* &&((id)&ID_SCOPE_MASK)==ID_CONST) */
#define is_const_id(id) (is_notop_id(id))
/* &&((id)&ID_SCOPE_MASK)==ID_CONST) */
int
static
int
mrb_is_const_id
(
mrb_sym
id
)
mrb_is_const_id
(
mrb_sym
id
)
{
{
return
is_const_id
(
id
);
return
is_const_id
(
id
);
...
@@ -284,7 +284,7 @@ make_struct(mrb_state *mrb, mrb_value name, mrb_value members, struct RClass * k
...
@@ -284,7 +284,7 @@ make_struct(mrb_state *mrb, mrb_value name, mrb_value members, struct RClass * k
return
nstr
;
return
nstr
;
}
}
mrb_value
static
mrb_value
mrb_struct_define
(
mrb_state
*
mrb
,
const
char
*
name
,
...)
mrb_struct_define
(
mrb_state
*
mrb
,
const
char
*
name
,
...)
{
{
va_list
ar
;
va_list
ar
;
...
@@ -436,7 +436,7 @@ mrb_struct_initialize_m(mrb_state *mrb, /*int argc, mrb_value *argv,*/ mrb_value
...
@@ -436,7 +436,7 @@ mrb_struct_initialize_m(mrb_state *mrb, /*int argc, mrb_value *argv,*/ mrb_value
return
mrb_struct_initialize_withArg
(
mrb
,
argc
,
argv
,
self
);
return
mrb_struct_initialize_withArg
(
mrb
,
argc
,
argv
,
self
);
}
}
mrb_value
static
mrb_value
mrb_struct_initialize
(
mrb_state
*
mrb
,
mrb_value
self
,
mrb_value
values
)
mrb_struct_initialize
(
mrb_state
*
mrb
,
mrb_value
self
,
mrb_value
values
)
{
{
return
mrb_struct_initialize_withArg
(
mrb
,
RARRAY_LEN
(
values
),
RARRAY_PTR
(
values
),
self
);
return
mrb_struct_initialize_withArg
(
mrb
,
RARRAY_LEN
(
values
),
RARRAY_PTR
(
values
),
self
);
...
@@ -506,7 +506,7 @@ mrb_struct_inspect(mrb_state *mrb, mrb_value s)
...
@@ -506,7 +506,7 @@ mrb_struct_inspect(mrb_state *mrb, mrb_value s)
/* 15.2.18.4.9 */
/* 15.2.18.4.9 */
/* :nodoc: */
/* :nodoc: */
mrb_value
static
mrb_value
mrb_struct_init_copy
(
mrb_state
*
mrb
,
mrb_value
copy
)
mrb_struct_init_copy
(
mrb_state
*
mrb
,
mrb_value
copy
)
{
{
mrb_value
s
;
mrb_value
s
;
...
@@ -584,7 +584,7 @@ struct_aref_int(mrb_state *mrb, mrb_value s, mrb_int i)
...
@@ -584,7 +584,7 @@ struct_aref_int(mrb_state *mrb, mrb_value s, mrb_int i)
* joe[:name] #=> "Joe Smith"
* joe[:name] #=> "Joe Smith"
* joe[0] #=> "Joe Smith"
* joe[0] #=> "Joe Smith"
*/
*/
mrb_value
static
mrb_value
mrb_struct_aref
(
mrb_state
*
mrb
,
mrb_value
s
)
mrb_struct_aref
(
mrb_state
*
mrb
,
mrb_value
s
)
{
{
mrb_value
idx
;
mrb_value
idx
;
...
@@ -651,7 +651,7 @@ mrb_struct_aset_sym(mrb_state *mrb, mrb_value s, mrb_sym id, mrb_value val)
...
@@ -651,7 +651,7 @@ mrb_struct_aset_sym(mrb_state *mrb, mrb_value s, mrb_sym id, mrb_value val)
* joe.zip #=> "90210"
* joe.zip #=> "90210"
*/
*/
mrb_value
static
mrb_value
mrb_struct_aset
(
mrb_state
*
mrb
,
mrb_value
s
)
mrb_struct_aset
(
mrb_state
*
mrb
,
mrb_value
s
)
{
{
mrb_int
i
;
mrb_int
i
;
...
...
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