Project

General

Profile

Misc #11649 ยป 0001-Use-rb_method_visibility_t-instead-of-int-in-rb_prin.patch

yui-knk (Kaneko Yuichiro), 11/03/2015 08:16 AM

View differences:

eval_error.c
215 215
	undef_mesg_for(v, "class"))
216 216

  
217 217
void
218
rb_print_undef(VALUE klass, ID id, int visi)
218
rb_print_undef(VALUE klass, ID id, rb_method_visibility_t visi)
219 219
{
220 220
    const int is_mod = RB_TYPE_P(klass, T_MODULE);
221 221
    VALUE mesg;
eval_intern.h
286 286

  
287 287
NORETURN(void rb_fiber_start(void));
288 288

  
289
NORETURN(void rb_print_undef(VALUE, ID, int));
289
NORETURN(void rb_print_undef(VALUE, ID, rb_method_visibility_t));
290 290
NORETURN(void rb_print_undef_str(VALUE, VALUE));
291 291
NORETURN(void rb_print_inaccessible(VALUE, ID, rb_method_visibility_t));
292 292
NORETURN(void rb_vm_localjump_error(const char *,VALUE, int));
proc.c
1255 1255
	    return mnew_missing(klass, obj, id, rid, mclass);
1256 1256
	}
1257 1257
	if (!error) return Qnil;
1258
	rb_print_undef(klass, id, 0);
1258
	rb_print_undef(klass, id, METHOD_VISI_UNDEF);
1259 1259
    }
1260 1260
    if (visi == METHOD_VISI_UNDEF) {
1261 1261
	visi = METHOD_ENTRY_VISI(me);
vm_method.c
984 984

  
985 985
    if (UNDEFINED_METHOD_ENTRY_P(me) ||
986 986
	UNDEFINED_REFINED_METHOD_P(me->def)) {
987
	rb_print_undef(klass, name, 0);
987
	rb_print_undef(klass, name, METHOD_VISI_UNDEF);
988 988
    }
989 989

  
990 990
    if (METHOD_ENTRY_VISI(me) != visi) {
......
1474 1474
	if ((!RB_TYPE_P(klass, T_MODULE)) ||
1475 1475
	    (orig_me = search_method(rb_cObject, original_name, &defined_class),
1476 1476
	     UNDEFINED_METHOD_ENTRY_P(orig_me))) {
1477
	    rb_print_undef(klass, original_name, 0);
1477
	    rb_print_undef(klass, original_name, METHOD_VISI_UNDEF);
1478 1478
	}
1479 1479
    }
1480 1480

  
......
1777 1777
		me = search_method(rb_cObject, id, 0);
1778 1778
	    }
1779 1779
	    if (UNDEFINED_METHOD_ENTRY_P(me)) {
1780
		rb_print_undef(module, id, 0);
1780
		rb_print_undef(module, id, METHOD_VISI_UNDEF);
1781 1781
	    }
1782 1782
	    if (me->def->type != VM_METHOD_TYPE_ZSUPER) {
1783 1783
		break; /* normal case: need not to follow 'super' link */
1784
-