Author: jonathan
Date: Wed Nov 26 10:10:46 2008
New Revision: 33227

Modified:
   trunk/DEPRECATED.pod
   trunk/src/pmc/class.pmc

Log:
[core] Deprecate the :vtable and :anon flats on the add_method method in the 
Class PMC, and create a new add_vtable_override method which you call to add 
overrides. The overloading of the meaning of anon with other places in Parrot, 
plus how rarely you'd likely want to enter something as a method under the same 
name as the vtable method/function/whatever, made it more confusing than useful.

Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod        (original)
+++ trunk/DEPRECATED.pod        Wed Nov 26 10:10:46 2008
@@ -74,6 +74,12 @@
 
 See RT #48014. This will be removed once all core PMCs have been updated.
 
+=item :anon and :vtable named parameters to add_method [post 0.8.2]
+
+If you want to override a vtable method/function when building a Class, then
+use the method C<add_vtable_override> instead of calling C<add_method> with
+one or both of these flags.
+
 =back
 
 =head1 PIR syntax

Modified: trunk/src/pmc/class.pmc
==============================================================================
--- trunk/src/pmc/class.pmc     (original)
+++ trunk/src/pmc/class.pmc     Wed Nov 26 10:10:46 2008
@@ -1686,6 +1686,20 @@
 
 /*
 
+=item C<void add_vtable_override(STRING *name, PMC *sub)>
+
+Adds the given sub PMC as a vtable override with the given name. Delegates to
+the C<add_vtable_override> vtable method.
+
+=cut
+
+*/
+    METHOD add_vtable_override(STRING *name, PMC *sub) {
+        VTABLE_add_vtable_override(interp, SELF, name, sub);
+    }
+
+/*
+
 =item C<void remove_method(STRING *name)>
 
 Removes the method with the given name.

Reply via email to