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
f0b86f36
Commit
f0b86f36
authored
May 15, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move mrb_irep_remove_lv from etc.c to mruby-bin-strip gem
parent
e0064aca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
include/mruby/irep.h
include/mruby/irep.h
+0
-1
mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c
mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c
+17
-1
src/etc.c
src/etc.c
+0
-15
No files found.
include/mruby/irep.h
View file @
f0b86f36
...
@@ -52,7 +52,6 @@ mrb_value mrb_load_irep_cxt(mrb_state*, const uint8_t*, mrbc_context*);
...
@@ -52,7 +52,6 @@ mrb_value mrb_load_irep_cxt(mrb_state*, const uint8_t*, mrbc_context*);
void
mrb_irep_free
(
mrb_state
*
,
struct
mrb_irep
*
);
void
mrb_irep_free
(
mrb_state
*
,
struct
mrb_irep
*
);
void
mrb_irep_incref
(
mrb_state
*
,
struct
mrb_irep
*
);
void
mrb_irep_incref
(
mrb_state
*
,
struct
mrb_irep
*
);
void
mrb_irep_decref
(
mrb_state
*
,
struct
mrb_irep
*
);
void
mrb_irep_decref
(
mrb_state
*
,
struct
mrb_irep
*
);
void
mrb_irep_remove_lv
(
mrb_state
*
,
struct
mrb_irep
*
);
#if defined(__cplusplus)
#if defined(__cplusplus)
}
/* extern "C" { */
}
/* extern "C" { */
...
...
mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c
View file @
f0b86f36
...
@@ -9,6 +9,22 @@ struct strip_args {
...
@@ -9,6 +9,22 @@ struct strip_args {
mrb_bool
lvar
;
mrb_bool
lvar
;
};
};
static
void
irep_remove_lv
(
mrb_state
*
mrb
,
mrb_irep
*
irep
)
{
size_t
i
;
if
(
irep
->
lv
)
{
mrb_free
(
mrb
,
irep
->
lv
);
irep
->
lv
=
NULL
;
}
for
(
i
=
0
;
i
<
irep
->
rlen
;
++
i
)
{
irep_remove_lv
(
mrb
,
irep
->
reps
[
i
]);
}
}
static
void
static
void
print_usage
(
const
char
*
f
)
print_usage
(
const
char
*
f
)
{
{
...
@@ -99,7 +115,7 @@ main(int argc, char **argv)
...
@@ -99,7 +115,7 @@ main(int argc, char **argv)
for
(
i
=
args_result
;
i
<
argc
;
++
i
)
{
for
(
i
=
args_result
;
i
<
argc
;
++
i
)
{
/* clear lv if --lvar is enabled */
/* clear lv if --lvar is enabled */
if
(
args
.
lvar
)
{
if
(
args
.
lvar
)
{
mrb_
irep_remove_lv
(
mrb
,
ireps
[
i
]);
irep_remove_lv
(
mrb
,
ireps
[
i
]);
}
}
/* debug flag must be alway false */
/* debug flag must be alway false */
...
...
src/etc.c
View file @
f0b86f36
...
@@ -183,18 +183,3 @@ mrb_regexp_p(mrb_state *mrb, mrb_value v)
...
@@ -183,18 +183,3 @@ mrb_regexp_p(mrb_state *mrb, mrb_value v)
{
{
return
mrb_class_defined
(
mrb
,
REGEXP_CLASS
)
&&
mrb_obj_is_kind_of
(
mrb
,
v
,
mrb_class_get
(
mrb
,
REGEXP_CLASS
));
return
mrb_class_defined
(
mrb
,
REGEXP_CLASS
)
&&
mrb_obj_is_kind_of
(
mrb
,
v
,
mrb_class_get
(
mrb
,
REGEXP_CLASS
));
}
}
void
mrb_irep_remove_lv
(
mrb_state
*
mrb
,
mrb_irep
*
irep
)
{
size_t
i
;
if
(
irep
->
lv
)
{
mrb_free
(
mrb
,
irep
->
lv
);
irep
->
lv
=
NULL
;
}
for
(
i
=
0
;
i
<
irep
->
rlen
;
++
i
)
{
mrb_irep_remove_lv
(
mrb
,
irep
->
reps
[
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