Author: leo
Date: Wed Jul 27 09:18:57 2005
New Revision: 8704

Modified:
   trunk/classes/sub.pmc
Log:
add Sub.set_string_native to set a subname

Modified: trunk/classes/sub.pmc
==============================================================================
--- trunk/classes/sub.pmc       (original)
+++ trunk/classes/sub.pmc       Wed Jul 27 09:18:57 2005
@@ -371,6 +371,10 @@ Destroys the subroutine.
 
 Returns the name of the subroutine.
 
+=item C<void set_string_native(STRING *subname)>
+
+Sets the name of the subroutine.
+
 =cut
 
 */
@@ -379,6 +383,11 @@ Returns the name of the subroutine.
         return Parrot_full_sub_name(INTERP, SELF);
     }
 
+    void set_string_native(STRING *subname) {
+        struct Parrot_sub * sub = PMC_sub(SELF);
+        sub->name = string_copy(INTERP, subname);
+    }
+
 /*
 
 =item C<void set_pointer(void *value)>

Reply via email to