summaryrefslogtreecommitdiff
path: root/ext/List/Util/Util.xs
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2001-09-04 16:51:29 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2001-09-05 12:10:50 +0000
commitd3632a54487acc5f59859996dcd6594d894cdc1a (patch)
tree96d3059492f8651e053794c166d3e3b5dd74fe8d /ext/List/Util/Util.xs
parentf8aada623c35865871672070ed5ed83d6d2a63a7 (diff)
downloadperl-d3632a54487acc5f59859996dcd6594d894cdc1a.tar.gz
Re: Perl_pp_* in public API?
Message-Id: <a05101000b7bb3f558c8a@[172.16.52.1]> p4raw-id: //depot/perl@11878
Diffstat (limited to 'ext/List/Util/Util.xs')
-rw-r--r--ext/List/Util/Util.xs9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/List/Util/Util.xs b/ext/List/Util/Util.xs
index b53d59ea90..8720d98985 100644
--- a/ext/List/Util/Util.xs
+++ b/ext/List/Util/Util.xs
@@ -268,15 +268,16 @@ CODE:
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 ; ) {