summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-12-22 18:26:21 +0000
committerNicholas Clark <nick@ccl4.org>2007-12-22 18:26:21 +0000
commit24792b8dabd61fb81a064d275b67bc65123a8d4c (patch)
treed586244a6482f635ca0ebf02092f2c76ff71c8d9
parentd0cc0e64ef59c3e62362fbf0dc35c7753c137553 (diff)
downloadperl-24792b8dabd61fb81a064d275b67bc65123a8d4c.tar.gz
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
-rw-r--r--handy.h14
-rw-r--r--op.h2
-rw-r--r--perl.h5
-rw-r--r--pod/perlapi.pod4
-rw-r--r--sv.c2
5 files changed, 17 insertions, 10 deletions
diff --git a/handy.h b/handy.h
index 4903595b68..332d85cab7 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<PERL_CORE> is defined.)
=for apidoc AmU||Nullsv
-Null SV pointer.
+Null SV pointer. (No longer available when C<PERL_CORE> 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 2720df032f..9dda22fbcb 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 e379cc31c6..bf4db2410e 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 664f42ca5c..df9572a87f 100644
--- a/pod/perlapi.pod
+++ b/pod/perlapi.pod
@@ -1405,7 +1405,7 @@ Found in file av.h
=item Nullch
X<Nullch>
-Null character pointer.
+Null character pointer. (No longer available when C<PERL_CORE> is defined.)
=for hackers
Found in file handy.h
@@ -1429,7 +1429,7 @@ Found in file hv.h
=item Nullsv
X<Nullsv>
-Null SV pointer.
+Null SV pointer. (No longer available when C<PERL_CORE> is defined.)
=for hackers
Found in file handy.h
diff --git a/sv.c b/sv.c
index 42e9d91081..bce242fab4 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;