On Tue Oct 02 10:40:14 2007, pcoch wrote:
> In src/objects.c there is the todo item within Parrot_get_vtable_index():
>         /* XXX slot_names still have __ in front */
>         const INTVAL cmp = strcmp(name_c, meth_c + 2);
> I'm guessing by this comment that they shouldn't anymore...

With the attached patch, parrot builds and tests with no errors[0]. A 
re-configure is necessary to 
regenerate a file.


[0] well, no additional or unexpected errors.
-- 
Will "Coke" Coleda
Index: src/oo.c
===================================================================
--- src/oo.c    (revision 31989)
+++ src/oo.c    (working copy)
@@ -382,8 +382,7 @@
         const INTVAL       mid    = (low + high) / 2;
         const char * const meth_c = Parrot_vtable_slot_names[mid];
 
-        /* RT #45965 slot_names still have __ in front */
-        const INTVAL cmp = strcmp(name_c, meth_c + 2);
+        const INTVAL cmp = strcmp(name_c, meth_c);
 
         if (cmp == 0) {
             string_cstring_free(name_c);
Index: lib/Parrot/Vtable.pm
===================================================================
--- lib/Parrot/Vtable.pm        (revision 31989)
+++ lib/Parrot/Vtable.pm        (working copy)
@@ -231,7 +231,7 @@
     for my $entry ( @{$vtable} ) {
         my $uc_meth = uc $entry->[1];
         $macros .= <<"EOM";
-#define PARROT_VTABLE_${uc_meth}_METHNAME \"__$entry->[1]\"
+#define PARROT_VTABLE_${uc_meth}_METHNAME \"$entry->[1]\"
 EOM
 
     }
@@ -266,7 +266,7 @@
         next if ( $entry->[4] =~ /MMD_/ );
         $num_vtable_funcs++;
         $macros .= <<"EOM";
-        \"__$entry->[1]\",
+        \"$entry->[1]\",
 EOM
     }
     $macros .= <<"EOM";
@@ -310,7 +310,7 @@
         next if ( $entry->[4] =~ /_STR$/ );
         next if ( $entry->[4] =~ /_FLOAT$/ );
         $macros .= <<"EOM";
-        \"__$entry->[1]\",
+        \"$entry->[1]\",
 EOM
     }
     $macros .= <<"EOM";

Reply via email to