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


The get_repr was present in vtable but missing as an op.
I added it and added a test in t/pmc/bigint.t
Note that you need to compile with the gmp library if
you want to do the test/


Patch attached 

--
 stef

--- ./t/pmc/bigint.t.old        2004-08-22 11:15:52.000000000 +0200
+++ ./t/pmc/bigint.t    2004-10-11 21:53:32.690558368 +0200
@@ -84,10 +84,14 @@
    set I1, P0
    print I1
    print "\n"
+   get_repr S0, P0
+   print S0
+   print "\n"
    end
 CODE
 999999
+999999L
 OUT
 
 output_is(<<"CODE", <<'OUT', "set int, get double");
--- ./ops/pmc.ops.old   2004-09-06 01:52:23.000000000 +0200
+++ ./ops/pmc.ops       2004-10-11 22:30:10.819391992 +0200
@@ -203,6 +203,18 @@
     goto NEXT();
 }
 
+
+=item B<get_repr>(out STR, in PMC) 
+
+Set $1 to a string reprentation of $2
+
+=cut
+
+op get_repr(out STR, in PMC) {
+    $1 = $2->vtable->get_repr(interpreter, $2);
+    goto NEXT();
+}
+
 =back
 
 =cut

Reply via email to