# New Ticket Created by  Stephane Peiry 
# Please include the string:  [perl #31537]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=31537 >



This patch adds the set_pointer method to the UnManagedStruct PMC.

This is needed when the actual structure already exist outside of
parrot and we want it to work on it (see: Parrot_PMC_set_pointer
in include/parrot/extend.h).
Thanks,
Stephane
Index: classes/unmanagedstruct.pmc
===================================================================
RCS file: /cvs/public/parrot/classes/unmanagedstruct.pmc,v
retrieving revision 1.46
diff -u -r1.46 unmanagedstruct.pmc
--- classes/unmanagedstruct.pmc 12 Aug 2004 09:10:05 -0000      1.46
+++ classes/unmanagedstruct.pmc 12 Sep 2004 14:34:15 -0000
@@ -883,6 +883,20 @@
 
 /*
 
+=item C<void set_pointer(void* value)>
+
+Set the pointer to the actual C C<struct>.
+
+=cut
+
+*/
+
+    void set_pointer(void* value) {
+        PMC_data(SELF) = value;
+    }
+
+/*
+
 =item C<void set_integer_keyed_int(INTVAL ix, INTVAL value)>
 
 Sets the value of the element at index C<ix> to C<value>.

Reply via email to