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
400ccecf
Commit
400ccecf
authored
Oct 10, 2013
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add mrb_gv_remove(); untested
parent
9295f6ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
include/mruby/variable.h
include/mruby/variable.h
+1
-0
src/variable.c
src/variable.c
+11
-0
No files found.
include/mruby/variable.h
View file @
400ccecf
...
...
@@ -53,6 +53,7 @@ mrb_value mrb_mod_constants(mrb_state *mrb, mrb_value mod);
mrb_value
mrb_f_global_variables
(
mrb_state
*
mrb
,
mrb_value
self
);
mrb_value
mrb_gv_get
(
mrb_state
*
mrb
,
mrb_sym
sym
);
void
mrb_gv_set
(
mrb_state
*
mrb
,
mrb_sym
sym
,
mrb_value
val
);
void
mrb_gv_remove
(
mrb_state
*
mrb
,
mrb_sym
sym
);
mrb_value
mrb_obj_instance_variables
(
mrb_state
*
,
mrb_value
);
mrb_value
mrb_obj_iv_inspect
(
mrb_state
*
,
struct
RObject
*
);
mrb_sym
mrb_class_sym
(
mrb_state
*
mrb
,
struct
RClass
*
c
,
struct
RClass
*
outer
);
...
...
src/variable.c
View file @
400ccecf
...
...
@@ -1031,6 +1031,17 @@ mrb_gv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
iv_put
(
mrb
,
t
,
sym
,
v
);
}
void
mrb_gv_remove
(
mrb_state
*
mrb
,
mrb_sym
sym
)
{
iv_tbl
*
t
;
if
(
!
mrb
->
globals
)
{
return
;
}
iv_del
(
mrb
,
mrb
->
globals
,
sym
,
NULL
);
}
static
int
gv_i
(
mrb_state
*
mrb
,
mrb_sym
sym
,
mrb_value
v
,
void
*
p
)
{
...
...
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