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
505e6017
Commit
505e6017
authored
Sep 20, 2018
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add MRB_IMPROVE_META_PROGRAMMING configuration"
This reverts commit
1997fcf9
. It became the default behavior.
parent
d192a52e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
13 deletions
+0
-13
include/mrbconf.h
include/mrbconf.h
+0
-3
src/variable.c
src/variable.c
+0
-10
No files found.
include/mrbconf.h
View file @
505e6017
...
...
@@ -110,9 +110,6 @@
/* fixed size state atexit stack */
//#define MRB_FIXED_STATE_ATEXIT_STACK
/* improve meta programming support */
//#define MRB_IMPROVE_META_PROGRAMMING
/* -DMRB_DISABLE_XXXX to drop following features */
//#define MRB_DISABLE_STDIO /* use of stdio */
...
...
src/variable.c
View file @
505e6017
...
...
@@ -344,9 +344,7 @@ mrb_iv_get(mrb_state *mrb, mrb_value obj, mrb_sym sym)
return
mrb_nil_value
();
}
#ifdef MRB_IMPROVE_META_PROGRAMMING
static
inline
void
assign_class_name
(
mrb_state
*
mrb
,
struct
RObject
*
obj
,
mrb_sym
sym
,
mrb_value
v
);
#endif
MRB_API
void
mrb_obj_iv_set
(
mrb_state
*
mrb
,
struct
RObject
*
obj
,
mrb_sym
sym
,
mrb_value
v
)
...
...
@@ -356,9 +354,7 @@ mrb_obj_iv_set(mrb_state *mrb, struct RObject *obj, mrb_sym sym, mrb_value v)
if
(
MRB_FROZEN_P
(
obj
))
{
mrb_raisef
(
mrb
,
E_FROZEN_ERROR
,
"can't modify frozen %S"
,
mrb_obj_value
(
obj
));
}
#ifdef MRB_IMPROVE_META_PROGRAMMING
assign_class_name
(
mrb
,
obj
,
sym
,
v
);
#endif
if
(
!
obj
->
iv
)
{
obj
->
iv
=
iv_new
(
mrb
);
}
...
...
@@ -367,7 +363,6 @@ mrb_obj_iv_set(mrb_state *mrb, struct RObject *obj, mrb_sym sym, mrb_value v)
mrb_write_barrier
(
mrb
,
(
struct
RBasic
*
)
obj
);
}
#ifdef MRB_IMPROVE_META_PROGRAMMING
static
inline
mrb_bool
is_namespace
(
enum
mrb_vtype
tt
)
{
...
...
@@ -399,7 +394,6 @@ assign_class_name(mrb_state *mrb, struct RObject *obj, mrb_sym sym, mrb_value v)
}
}
}
#endif
MRB_API
void
mrb_iv_set
(
mrb_state
*
mrb
,
mrb_value
obj
,
mrb_sym
sym
,
mrb_value
v
)
...
...
@@ -1110,14 +1104,10 @@ mrb_class_find_path(mrb_state *mrb, struct RClass *c)
str
=
mrb_sym2name_len
(
mrb
,
name
,
&
len
);
mrb_str_cat
(
mrb
,
path
,
str
,
len
);
#ifdef MRB_IMPROVE_META_PROGRAMMING
if
(
RSTRING_PTR
(
path
)[
0
]
!=
'#'
)
{
#endif
iv_del
(
mrb
,
c
->
iv
,
mrb_intern_lit
(
mrb
,
"__outer__"
),
NULL
);
iv_put
(
mrb
,
c
->
iv
,
mrb_intern_lit
(
mrb
,
"__classname__"
),
path
);
mrb_field_write_barrier_value
(
mrb
,
(
struct
RBasic
*
)
c
,
path
);
#ifdef MRB_IMPROVE_META_PROGRAMMING
}
#endif
return
path
;
}
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