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
6aa6e75f
Commit
6aa6e75f
authored
Aug 04, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename obsolete mrb_special_const_p to mrb_immediate_p
parent
206f89e2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
src/array.c
src/array.c
+2
-2
src/etc.c
src/etc.c
+2
-2
src/gc.c
src/gc.c
+1
-1
src/kernel.c
src/kernel.c
+2
-2
src/object.c
src/object.c
+1
-1
No files found.
src/array.c
View file @
6aa6e75f
...
...
@@ -1046,7 +1046,7 @@ mrb_ary_eq(mrb_state *mrb, mrb_value ary1)
mrb_get_args
(
mrb
,
"o"
,
&
ary2
);
if
(
mrb_obj_equal
(
mrb
,
ary1
,
ary2
))
return
mrb_true_value
();
if
(
mrb_
special_const
_p
(
ary2
))
return
mrb_false_value
();
if
(
mrb_
immediate
_p
(
ary2
))
return
mrb_false_value
();
if
(
!
mrb_array_p
(
ary2
))
{
return
mrb_false_value
();
}
...
...
@@ -1062,7 +1062,7 @@ mrb_ary_cmp(mrb_state *mrb, mrb_value ary1)
mrb_get_args
(
mrb
,
"o"
,
&
ary2
);
if
(
mrb_obj_equal
(
mrb
,
ary1
,
ary2
))
return
mrb_fixnum_value
(
0
);
if
(
mrb_
special_const
_p
(
ary2
))
return
mrb_nil_value
();
if
(
mrb_
immediate
_p
(
ary2
))
return
mrb_nil_value
();
if
(
!
mrb_array_p
(
ary2
))
{
return
mrb_nil_value
();
}
...
...
src/etc.c
View file @
6aa6e75f
...
...
@@ -26,7 +26,7 @@ mrb_data_object_alloc(mrb_state *mrb, struct RClass *klass, void *ptr, const mrb
MRB_API
void
mrb_data_check_type
(
mrb_state
*
mrb
,
mrb_value
obj
,
const
mrb_data_type
*
type
)
{
if
(
mrb_
special_const
_p
(
obj
)
||
(
mrb_type
(
obj
)
!=
MRB_TT_DATA
))
{
if
(
mrb_
immediate
_p
(
obj
)
||
(
mrb_type
(
obj
)
!=
MRB_TT_DATA
))
{
mrb_check_type
(
mrb
,
obj
,
MRB_TT_DATA
);
}
if
(
DATA_TYPE
(
obj
)
!=
type
)
{
...
...
@@ -48,7 +48,7 @@ mrb_data_check_type(mrb_state *mrb, mrb_value obj, const mrb_data_type *type)
MRB_API
void
*
mrb_data_check_get_ptr
(
mrb_state
*
mrb
,
mrb_value
obj
,
const
mrb_data_type
*
type
)
{
if
(
mrb_
special_const
_p
(
obj
)
||
(
mrb_type
(
obj
)
!=
MRB_TT_DATA
))
{
if
(
mrb_
immediate
_p
(
obj
)
||
(
mrb_type
(
obj
)
!=
MRB_TT_DATA
))
{
return
NULL
;
}
if
(
DATA_TYPE
(
obj
)
!=
type
)
{
...
...
src/gc.c
View file @
6aa6e75f
...
...
@@ -389,7 +389,7 @@ gc_protect(mrb_state *mrb, struct RBasic *p)
MRB_API
void
mrb_gc_protect
(
mrb_state
*
mrb
,
mrb_value
obj
)
{
if
(
mrb_
special_const
_p
(
obj
))
return
;
if
(
mrb_
immediate
_p
(
obj
))
return
;
gc_protect
(
mrb
,
mrb_basic_ptr
(
obj
));
}
...
...
src/kernel.c
View file @
6aa6e75f
...
...
@@ -317,7 +317,7 @@ mrb_obj_clone(mrb_state *mrb, mrb_value self)
struct
RObject
*
p
;
mrb_value
clone
;
if
(
mrb_
special_const
_p
(
self
))
{
if
(
mrb_
immediate
_p
(
self
))
{
mrb_raisef
(
mrb
,
E_TYPE_ERROR
,
"can't clone %S"
,
self
);
}
p
=
(
struct
RObject
*
)
mrb_obj_alloc
(
mrb
,
mrb_type
(
self
),
mrb_obj_class
(
mrb
,
self
));
...
...
@@ -353,7 +353,7 @@ mrb_obj_dup(mrb_state *mrb, mrb_value obj)
struct
RBasic
*
p
;
mrb_value
dup
;
if
(
mrb_
special_const
_p
(
obj
))
{
if
(
mrb_
immediate
_p
(
obj
))
{
mrb_raisef
(
mrb
,
E_TYPE_ERROR
,
"can't dup %S"
,
obj
);
}
p
=
mrb_obj_alloc
(
mrb
,
mrb_type
(
obj
),
mrb_obj_class
(
mrb
,
obj
));
...
...
src/object.c
View file @
6aa6e75f
...
...
@@ -407,7 +407,7 @@ mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t)
else
if
(
mrb_type
(
x
)
==
MRB_TT_SYMBOL
)
{
etype
=
"Symbol"
;
}
else
if
(
mrb_
special_const
_p
(
x
))
{
else
if
(
mrb_
immediate
_p
(
x
))
{
etype
=
RSTRING_PTR
(
mrb_obj_as_string
(
mrb
,
x
));
}
else
{
...
...
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