rename obsolete mrb_special_const_p to mrb_immediate_p

parent 206f89e2
......@@ -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();
}
......
......@@ -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) {
......
......@@ -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));
}
......
......@@ -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));
......
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment