From: Nicholas Clark Date: Sat, 22 Dec 2007 18:26:21 +0000 (+0000) Subject: Remove the definitions of Null(), Nullch, Nullfp, Nullsv and PL_na X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=24792b8dabd61fb81a064d275b67bc65123a8d4c;p=p5sagit%2Fp5-mst-13.2.git Remove the definitions of Null(), Nullch, Nullfp, Nullsv and PL_na when PERL_CORE is defined. (Which, "obviously", is only in code within the perl source tree, which we control). Nullop remains, and would be moderately invasive to remove. p4raw-id: //depot/perl@32707 --- diff --git a/handy.h b/handy.h index 4903595..332d85c 100644 --- a/handy.h +++ b/handy.h @@ -19,23 +19,25 @@ #endif #endif -#define Null(type) ((type)NULL) +#ifndef PERL_CORE +# define Null(type) ((type)NULL) /* =head1 Handy Values =for apidoc AmU||Nullch -Null character pointer. +Null character pointer. (No longer available when C is defined.) =for apidoc AmU||Nullsv -Null SV pointer. +Null SV pointer. (No longer available when C is defined.) =cut */ -#define Nullch Null(char*) -#define Nullfp Null(PerlIO*) -#define Nullsv Null(SV*) +# define Nullch Null(char*) +# define Nullfp Null(PerlIO*) +# define Nullsv Null(SV*) +#endif #ifdef TRUE #undef TRUE diff --git a/op.h b/op.h index 2720df0..9dda22f 100644 --- a/op.h +++ b/op.h @@ -509,7 +509,7 @@ struct loop { #define cSVOPo_sv cSVOPx_sv(o) #define kSVOP_sv cSVOPx_sv(kid) -#define Nullop Null(OP*) +#define Nullop ((OP*)NULL) /* Lowest byte-and-a-bit of PL_opargs */ #define OA_MARK 1 diff --git a/perl.h b/perl.h index e379cc3..bf4db24 100644 --- a/perl.h +++ b/perl.h @@ -4723,6 +4723,11 @@ START_EXTERN_C END_EXTERN_C #endif +#ifdef PERL_CORE +/* All core uses now exterminated. Ensure no zombies can return: */ +# undef PL_na +#endif + #if defined(WIN32) /* Now all the config stuff is setup we can include embed.h */ # include "embed.h" diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 664f42c..df9572a 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -1405,7 +1405,7 @@ Found in file av.h =item Nullch X -Null character pointer. +Null character pointer. (No longer available when C is defined.) =for hackers Found in file handy.h @@ -1429,7 +1429,7 @@ Found in file hv.h =item Nullsv X -Null SV pointer. +Null SV pointer. (No longer available when C is defined.) =for hackers Found in file handy.h diff --git a/sv.c b/sv.c index 42e9d91..bce242f 100644 --- a/sv.c +++ b/sv.c @@ -11503,7 +11503,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_Sv = NULL; PL_Xpv = (XPV*)NULL; - PL_na = proto_perl->Ina; + my_perl->Ina = proto_perl->Ina; PL_statbuf = proto_perl->Istatbuf; PL_statcache = proto_perl->Istatcache;