From: Nicholas Clark Date: Wed, 26 Nov 2008 16:04:04 +0000 (+0000) Subject: Following on from change 34918, scalarkids() and scalarseq() can also X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2dd5337ba7701c25f6807a12b77238cc673d5b07;p=p5sagit%2Fp5-mst-13.2.git Following on from change 34918, scalarkids() and scalarseq() can also be static in op.c, so make it so. p4raw-id: //depot/perl@34919 --- diff --git a/embed.fnc b/embed.fnc index 8a736be..8cb9b81 100644 --- a/embed.fnc +++ b/embed.fnc @@ -445,7 +445,9 @@ Ap |void |op_null |NN OP* o EXp |void |op_clear |NN OP* o Ap |void |op_refcnt_lock Ap |void |op_refcnt_unlock +#if defined(PERL_IN_OP_C) s |OP* |linklist |NN OP *o +#endif p |OP* |list |NULLOK OP* o p |OP* |listkids |NULLOK OP* o Apd |void |load_module|U32 flags|NN SV* name|NULLOK SV* ver|... @@ -812,8 +814,10 @@ Ap |void |save_sptr |NN SV** sptr Ap |SV* |save_svref |NN SV** sptr p |OP* |sawparens |NULLOK OP* o p |OP* |scalar |NULLOK OP* o -p |OP* |scalarkids |NULLOK OP* o -p |OP* |scalarseq |NULLOK OP* o +#if defined(PERL_IN_OP_C) +s |OP* |scalarkids |NULLOK OP* o +s |OP* |scalarseq |NULLOK OP* o +#endif p |OP* |scalarvoid |NN OP* o Apd |NV |scan_bin |NN const char* start|STRLEN len|NN STRLEN* retlen Apd |NV |scan_hex |NN const char* start|STRLEN len|NN STRLEN* retlen diff --git a/embed.h b/embed.h index b3934d1..71a5e5f 100644 --- a/embed.h +++ b/embed.h @@ -394,8 +394,12 @@ #endif #define op_refcnt_lock Perl_op_refcnt_lock #define op_refcnt_unlock Perl_op_refcnt_unlock +#if defined(PERL_IN_OP_C) #ifdef PERL_CORE #define linklist S_linklist +#endif +#endif +#ifdef PERL_CORE #define list Perl_list #define listkids Perl_listkids #endif @@ -792,8 +796,14 @@ #ifdef PERL_CORE #define sawparens Perl_sawparens #define scalar Perl_scalar -#define scalarkids Perl_scalarkids -#define scalarseq Perl_scalarseq +#endif +#if defined(PERL_IN_OP_C) +#ifdef PERL_CORE +#define scalarkids S_scalarkids +#define scalarseq S_scalarseq +#endif +#endif +#ifdef PERL_CORE #define scalarvoid Perl_scalarvoid #endif #define scan_bin Perl_scan_bin @@ -2709,8 +2719,12 @@ #endif #define op_refcnt_lock() Perl_op_refcnt_lock(aTHX) #define op_refcnt_unlock() Perl_op_refcnt_unlock(aTHX) +#if defined(PERL_IN_OP_C) #ifdef PERL_CORE #define linklist(a) S_linklist(aTHX_ a) +#endif +#endif +#ifdef PERL_CORE #define list(a) Perl_list(aTHX_ a) #define listkids(a) Perl_listkids(aTHX_ a) #endif @@ -3103,8 +3117,14 @@ #ifdef PERL_CORE #define sawparens(a) Perl_sawparens(aTHX_ a) #define scalar(a) Perl_scalar(aTHX_ a) -#define scalarkids(a) Perl_scalarkids(aTHX_ a) -#define scalarseq(a) Perl_scalarseq(aTHX_ a) +#endif +#if defined(PERL_IN_OP_C) +#ifdef PERL_CORE +#define scalarkids(a) S_scalarkids(aTHX_ a) +#define scalarseq(a) S_scalarseq(aTHX_ a) +#endif +#endif +#ifdef PERL_CORE #define scalarvoid(a) Perl_scalarvoid(aTHX_ a) #endif #define scan_bin(a,b,c) Perl_scan_bin(aTHX_ a,b,c) diff --git a/op.c b/op.c index 0fd564e..dff969e 100644 --- a/op.c +++ b/op.c @@ -818,7 +818,7 @@ S_linklist(pTHX_ OP *o) } OP * -Perl_scalarkids(pTHX_ OP *o) +S_scalarkids(pTHX_ OP *o) { if (o && o->op_flags & OPf_KIDS) { OP *kid; @@ -848,6 +848,7 @@ S_scalarboolean(pTHX_ OP *o) return scalar(o); } +/* This is used in S_doeval in pp_ctl.c */ OP * Perl_scalar(pTHX_ OP *o) { @@ -921,6 +922,7 @@ Perl_scalar(pTHX_ OP *o) return o; } +/* This is used in S_doeval in pp_ctl.c */ OP * Perl_scalarvoid(pTHX_ OP *o) { @@ -1216,6 +1218,7 @@ Perl_listkids(pTHX_ OP *o) return o; } +/* This is used in S_doeval in pp_ctl.c */ OP * Perl_list(pTHX_ OP *o) { @@ -1294,7 +1297,7 @@ Perl_list(pTHX_ OP *o) } OP * -Perl_scalarseq(pTHX_ OP *o) +S_scalarseq(pTHX_ OP *o) { dVAR; if (o) { @@ -2151,6 +2154,7 @@ Perl_my_attrs(pTHX_ OP *o, OP *attrs) return o; } +/* This is used in perly.y */ OP * Perl_sawparens(pTHX_ OP *o) { diff --git a/proto.h b/proto.h index 26de531..22efaf0 100644 --- a/proto.h +++ b/proto.h @@ -1446,11 +1446,13 @@ PERL_CALLCONV void Perl_op_clear(pTHX_ OP* o) PERL_CALLCONV void Perl_op_refcnt_lock(pTHX); PERL_CALLCONV void Perl_op_refcnt_unlock(pTHX); +#if defined(PERL_IN_OP_C) STATIC OP* S_linklist(pTHX_ OP *o) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_LINKLIST \ assert(o) +#endif PERL_CALLCONV OP* Perl_list(pTHX_ OP* o); PERL_CALLCONV OP* Perl_listkids(pTHX_ OP* o); PERL_CALLCONV void Perl_load_module(pTHX_ U32 flags, SV* name, SV* ver, ...) @@ -2924,8 +2926,10 @@ PERL_CALLCONV SV* Perl_save_svref(pTHX_ SV** sptr) PERL_CALLCONV OP* Perl_sawparens(pTHX_ OP* o); PERL_CALLCONV OP* Perl_scalar(pTHX_ OP* o); -PERL_CALLCONV OP* Perl_scalarkids(pTHX_ OP* o); -PERL_CALLCONV OP* Perl_scalarseq(pTHX_ OP* o); +#if defined(PERL_IN_OP_C) +STATIC OP* S_scalarkids(pTHX_ OP* o); +STATIC OP* S_scalarseq(pTHX_ OP* o); +#endif PERL_CALLCONV OP* Perl_scalarvoid(pTHX_ OP* o) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_SCALARVOID \