nwc10+ (Nicholas Clark)
2007-12-22 18:30:07 UTC
Change 32707 by ***@nicholas-saigo on 2007/12/22 18:26:21
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.
Affected files ...
... //depot/perl/handy.h#135 edit
... //depot/perl/op.h#192 edit
... //depot/perl/perl.h#808 edit
... //depot/perl/pod/perlapi.pod#305 edit
... //depot/perl/sv.c#1448 edit
Differences ...
==== //depot/perl/handy.h#135 (text) ====
Index: perl/handy.h
--- perl/handy.h#134~32237~ 2007-11-07 15:23:27.000000000 -0800
+++ perl/handy.h 2007-12-22 10:26:21.000000000 -0800
@@ -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
==== //depot/perl/op.h#192 (text) ====
Index: perl/op.h
--- perl/op.h#191~32237~ 2007-11-07 15:23:27.000000000 -0800
+++ perl/op.h 2007-12-22 10:26:21.000000000 -0800
@@ -509,7 +509,7 @@
#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
==== //depot/perl/perl.h#808 (text) ====
Index: perl/perl.h
--- perl/perl.h#807~32699~ 2007-12-22 03:28:02.000000000 -0800
+++ perl/perl.h 2007-12-22 10:26:21.000000000 -0800
@@ -4723,6 +4723,11 @@
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"
==== //depot/perl/pod/perlapi.pod#305 (text+w) ====
Index: perl/pod/perlapi.pod
--- perl/pod/perlapi.pod#304~32682~ 2007-12-20 14:22:59.000000000 -0800
+++ perl/pod/perlapi.pod 2007-12-22 10:26:21.000000000 -0800
@@ -1405,7 +1405,7 @@
=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 @@
=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
==== //depot/perl/sv.c#1448 (text) ====
Index: perl/sv.c
--- perl/sv.c#1447~32702~ 2007-12-22 08:05:50.000000000 -0800
+++ perl/sv.c 2007-12-22 10:26:21.000000000 -0800
@@ -11503,7 +11503,7 @@
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;
End of Patch.
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.
Affected files ...
... //depot/perl/handy.h#135 edit
... //depot/perl/op.h#192 edit
... //depot/perl/perl.h#808 edit
... //depot/perl/pod/perlapi.pod#305 edit
... //depot/perl/sv.c#1448 edit
Differences ...
==== //depot/perl/handy.h#135 (text) ====
Index: perl/handy.h
--- perl/handy.h#134~32237~ 2007-11-07 15:23:27.000000000 -0800
+++ perl/handy.h 2007-12-22 10:26:21.000000000 -0800
@@ -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
==== //depot/perl/op.h#192 (text) ====
Index: perl/op.h
--- perl/op.h#191~32237~ 2007-11-07 15:23:27.000000000 -0800
+++ perl/op.h 2007-12-22 10:26:21.000000000 -0800
@@ -509,7 +509,7 @@
#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
==== //depot/perl/perl.h#808 (text) ====
Index: perl/perl.h
--- perl/perl.h#807~32699~ 2007-12-22 03:28:02.000000000 -0800
+++ perl/perl.h 2007-12-22 10:26:21.000000000 -0800
@@ -4723,6 +4723,11 @@
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"
==== //depot/perl/pod/perlapi.pod#305 (text+w) ====
Index: perl/pod/perlapi.pod
--- perl/pod/perlapi.pod#304~32682~ 2007-12-20 14:22:59.000000000 -0800
+++ perl/pod/perlapi.pod 2007-12-22 10:26:21.000000000 -0800
@@ -1405,7 +1405,7 @@
=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 @@
=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
==== //depot/perl/sv.c#1448 (text) ====
Index: perl/sv.c
--- perl/sv.c#1447~32702~ 2007-12-22 08:05:50.000000000 -0800
+++ perl/sv.c 2007-12-22 10:26:21.000000000 -0800
@@ -11503,7 +11503,7 @@
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;
End of Patch.