Skip to content

Commit

Permalink
[PMC] Removed implicit double-underscore prefix logic to override vtable
Browse files Browse the repository at this point in the history
entries when adding Subs to NameSpace PMC.  If PASM still needs a fix, let's do it the right way and add the :vtable attribute to pcc_sub declarations.

git-svn-id: https://svn.parrot.org/parrot/trunk@42170 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
chromatic committed Oct 30, 2009
1 parent 01ed4b4 commit f93b314
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/pmc/namespace.pmc
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@ ns_insert_sub_keyed_str(PARROT_INTERP, PMC *self, STRING *key, PMC *value)

PMC_get_sub(interp, value, sub);

/* Handle vtable methods with two underscores at the start. */
if (sub->vtable_index == -1) {
if (Parrot_str_find_index(interp, key, CONST_STRING(interp, "__"), 0) == 0) {
STRING * const meth_name = Parrot_str_substr(interp, key, 2,
(INTVAL)(Parrot_str_byte_length(interp, key) - 2), NULL, 0);
sub->vtable_index =
Parrot_get_vtable_index(interp, meth_name);
}
}

if (sub->vtable_index != -1) {
/* Insert it in class, if there is a class */
if (!PMC_IS_NULL(classobj) && PObj_is_class_TEST(classobj)) {
Expand Down

0 comments on commit f93b314

Please sign in to comment.