From: Craig A. Berry Date: Tue, 4 Sep 2001 21:51:29 +0000 (-0500) Subject: Re: Perl_pp_* in public API? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d3632a54487acc5f59859996dcd6594d894cdc1a;p=p5sagit%2Fp5-mst-13.2.git Re: Perl_pp_* in public API? Message-Id: p4raw-id: //depot/perl@11878 --- diff --git a/ext/List/Util/Util.xs b/ext/List/Util/Util.xs index b53d59e..8720d98 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 ; ) {