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
ae306793
Commit
ae306793
authored
Aug 20, 2014
by
Tatsuhiko Kubo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use specified macro(NULL) instead of magic-number.
parent
d49f8517
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
src/class.c
src/class.c
+3
-3
src/codegen.c
src/codegen.c
+1
-1
src/parse.y
src/parse.y
+4
-4
No files found.
src/class.c
View file @
ae306793
...
...
@@ -128,7 +128,7 @@ mrb_class_outer_module(mrb_state *mrb, struct RClass *c)
mrb_value
outer
;
outer
=
mrb_obj_iv_get
(
mrb
,
(
struct
RObject
*
)
c
,
mrb_intern_lit
(
mrb
,
"__outer__"
));
if
(
mrb_nil_p
(
outer
))
return
0
;
if
(
mrb_nil_p
(
outer
))
return
NULL
;
return
mrb_class_ptr
(
outer
);
}
...
...
@@ -1030,7 +1030,7 @@ mrb_method_search_vm(mrb_state *mrb, struct RClass **cp, mrb_sym mid)
}
c
=
c
->
super
;
}
return
0
;
/* no method */
return
NULL
;
/* no method */
}
MRB_API
struct
RProc
*
...
...
@@ -1295,7 +1295,7 @@ MRB_API struct RClass *
mrb_class_real
(
struct
RClass
*
cl
)
{
if
(
cl
==
0
)
return
0
;
return
NULL
;
while
((
cl
->
tt
==
MRB_TT_SCLASS
)
||
(
cl
->
tt
==
MRB_TT_ICLASS
))
{
cl
=
cl
->
super
;
}
...
...
src/codegen.c
View file @
ae306793
...
...
@@ -2470,7 +2470,7 @@ scope_new(mrb_state *mrb, codegen_scope *prev, node *lv)
mrb_pool
*
pool
=
mrb_pool_open
(
mrb
);
codegen_scope
*
p
=
(
codegen_scope
*
)
mrb_pool_alloc
(
pool
,
sizeof
(
codegen_scope
));
if
(
!
p
)
return
0
;
if
(
!
p
)
return
NULL
;
*
p
=
codegen_scope_zero
;
p
->
mrb
=
mrb
;
p
->
mpool
=
pool
;
...
...
src/parse.y
View file @
ae306793
...
...
@@ -5365,9 +5365,9 @@ mrb_parser_new(mrb_state *mrb)
static const parser_state parser_state_zero = { 0 };
pool = mrb_pool_open(mrb);
if (!pool) return
0
;
if (!pool) return
NULL
;
p = (parser_state *)mrb_pool_alloc(pool, sizeof(parser_state));
if (!p) return
0
;
if (!p) return
NULL
;
*p = parser_state_zero;
p->mrb = mrb;
...
...
@@ -5483,7 +5483,7 @@ mrb_parse_file(mrb_state *mrb, FILE *f, mrbc_context *c)
parser_state *p;
p = mrb_parser_new(mrb);
if (!p) return
0
;
if (!p) return
NULL
;
p->s = p->send = NULL;
p->f = f;
...
...
@@ -5498,7 +5498,7 @@ mrb_parse_nstring(mrb_state *mrb, const char *s, int len, mrbc_context *c)
parser_state *p;
p = mrb_parser_new(mrb);
if (!p) return
0
;
if (!p) return
NULL
;
p->s = s;
p->send = s + len;
...
...
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