Change 11878 by jhi@alpha on 2001/09/05 12:10:50

        Subject: Re: Perl_pp_* in public API?
        From: "Craig A. Berry" <[EMAIL PROTECTED]>
        Date: Tue, 4 Sep 2001 21:51:29 -0500
        Message-Id: <a05101000b7bb3f558c8a@[172.16.52.1]>

Affected files ...

... //depot/perl/ext/List/Util/Util.xs#9 edit

Differences ...

==== //depot/perl/ext/List/Util/Util.xs#9 (text) ====
Index: perl/ext/List/Util/Util.xs
--- perl/ext/List/Util/Util.xs.~1~      Wed Sep  5 06:15:05 2001
+++ perl/ext/List/Util/Util.xs  Wed Sep  5 06:15:05 2001
@@ -268,15 +268,16 @@
     SV *my_pad[2];
     SV **old_curpad = PL_curpad;
 
-    /* We call pp_rand here so that Drand01 get initialized if rand()
-       or srand() has not already been called
-    */
     my_pad[1] = sv_newmortal();
     memzero((char*)(&dmy_op), sizeof(struct op));
     dmy_op.op_targ = 1;
     PL_op = &dmy_op;
     PL_curpad = (SV **)&my_pad;
-    pp_rand();
+    /* Call *(PL_ppaddr[OP_RAND]) so that Drand01 get initialized if rand()
+       or srand() has not already been called.  Can't call pp_rand()
+       since it's not in the public API (and shouldn't be).
+    */
+    *(PL_ppaddr[OP_RAND]);
     PL_op = old_op;
     PL_curpad = old_curpad;
     for (index = items ; index > 1 ; ) {
End of Patch.

Reply via email to