--- parrot/src/objects.c Thu Apr 15 16:02:02 2004 +++ parrot-leo/src/objects.c Fri Apr 16 11:49:55 2004 @@ -20,7 +20,8 @@ #include "parrot/parrot.h" #include - +//#include "objects.str" +#define _S(s) const_string(interpreter, s) static PMC * clone_array(Parrot_Interp interpreter, PMC *source_array) @@ -461,12 +462,11 @@ static PMC* get_init_meth(Parrot_Interp interpreter, PMC *class, - const char * init_name, STRING **meth_str) + const STRING *prop_str , STRING **meth_str) { PMC *prop; - STRING *prop_str, *meth; + STRING *meth; #if 0 - prop_str = const_string(interpreter, init_name); prop = VTABLE_getprop(interpreter, class, prop_str); if (!VTABLE_defined(interpreter, prop)) return NULL; @@ -476,7 +476,6 @@ PMC *props; if ( !(props = PMC_metadata(class))) return NULL; - prop_str = const_string(interpreter, init_name); b = hash_get_bucket(interpreter, (Hash*) PMC_struct_val(props), prop_str); if (!b) @@ -515,7 +514,8 @@ * no redispatch */ STRING *meth_str; - PMC *meth = get_init_meth(interpreter, class, "CONSTRUCT", &meth_str); + PMC *meth = get_init_meth(interpreter, class, _S("CONSTRUCT"), + &meth_str); if (meth) { if (init) Parrot_run_meth_fromc_args_save(interpreter, meth, @@ -532,7 +532,7 @@ for (i = nparents - 1; i >= 0; --i) { parent_class = VTABLE_get_pmc_keyed_int(interpreter, classsearch_array, i); - meth = get_init_meth(interpreter, parent_class, "BUILD", &meth_str); + meth = get_init_meth(interpreter, parent_class, _S("BUILD"), &meth_str); if (meth) { if (init) Parrot_run_meth_fromc_args_save(interpreter, meth, @@ -542,7 +542,7 @@ object, meth_str); } } - meth = get_init_meth(interpreter, class, "BUILD", &meth_str); + meth = get_init_meth(interpreter, class, _S("BUILD"), &meth_str); if (meth) { if (init) Parrot_run_meth_fromc_args_save(interpreter, meth,