Author: jonathan
Date: Fri Dec 5 10:41:08 2008
New Revision: 33519
Modified:
trunk/src/pmc/object.pmc
Log:
[core] Fix to the default clone routine for objects. Before, if there were
multiple PMC types inherited from, it would do the wrong thing. We never tried,
so we never knew, and it worked by accident.
Modified: trunk/src/pmc/object.pmc
==============================================================================
--- trunk/src/pmc/object.pmc (original)
+++ trunk/src/pmc/object.pmc Fri Dec 5 10:41:08 2008
@@ -691,9 +691,9 @@
if (cur_class->vtable->base_type == enum_class_PMCProxy) {
/* Clone this PMC too. */
STRING *proxy = CONST_STRING(interp, "proxy");
- VTABLE_set_attr_str(interp, cloned, proxy,
+ VTABLE_set_attr_keyed(interp, cloned, cur_class, proxy,
VTABLE_clone(interp,
- VTABLE_get_attr_keyed(interp, pmc, cur_class,
proxy)));
+ VTABLE_get_attr_keyed(interp, cloned, cur_class,
proxy)));
}
}
}