Change 33051 by [EMAIL PROTECTED] on 2008/01/23 09:22:01

        Deprecate (and remove core use of ) Nullav, Nullcv, Nullgv, Nullhe,
        Nullhek and Nullhv. Nullop is going to be a bit less simple.

Affected files ...

... //depot/perl/av.h#44 edit
... //depot/perl/cv.h#74 edit
... //depot/perl/ext/B/B.xs#148 edit
... //depot/perl/ext/DynaLoader/dl_symbian.xs#4 edit
... //depot/perl/gv.h#76 edit
... //depot/perl/hv.h#122 edit
... //depot/perl/pod/perlapi.pod#314 edit

Differences ...

==== //depot/perl/av.h#44 (text) ====
Index: perl/av.h
--- perl/av.h#43~32783~ 2007-12-30 02:30:15.000000000 -0800
+++ perl/av.h   2008-01-23 01:22:01.000000000 -0800
@@ -57,6 +57,8 @@
 =for apidoc AmU||Nullav
 Null AV pointer.
 
+(deprecated - use C<(AV *)NULL> instead)
+
 =head1 Array Manipulation Functions
 
 =for apidoc Am|int|AvFILL|AV* av
@@ -65,7 +67,9 @@
 =cut
 */
 
-#define Nullav Null(AV*)
+#ifndef PERL_CORE
+#  define Nullav Null(AV*)
+#endif
 
 #define AvARRAY(av)    ((av)->sv_u.svu_array)
 #define AvALLOC(av)    (*((SV***)&((XPVAV*)  SvANY(av))->xav_alloc))

==== //depot/perl/cv.h#74 (text) ====
Index: perl/cv.h
--- perl/cv.h#73~32783~ 2007-12-30 02:30:15.000000000 -0800
+++ perl/cv.h   2008-01-23 01:22:01.000000000 -0800
@@ -28,6 +28,8 @@
 =for apidoc AmU||Nullcv
 Null CV pointer.
 
+(deprecated - use C<(CV *)NULL> instead)
+
 =head1 CV Manipulation Functions
 
 =for apidoc Am|HV*|CvSTASH|CV* cv
@@ -36,7 +38,9 @@
 =cut
 */
 
-#define Nullcv Null(CV*)
+#ifndef PERL_CORE
+#  define Nullcv Null(CV*)
+#endif
 
 #define CvSTASH(sv)    ((XPVCV*)SvANY(sv))->xcv_stash
 #define CvSTART(sv)    ((XPVCV*)SvANY(sv))->xcv_start_u.xcv_start

==== //depot/perl/ext/B/B.xs#148 (text) ====
Index: perl/ext/B/B.xs
--- perl/ext/B/B.xs#147~32822~  2008-01-03 17:22:22.000000000 -0800
+++ perl/ext/B/B.xs     2008-01-23 01:22:01.000000000 -0800
@@ -1142,7 +1142,7 @@
 #define PADOP_sv(o)    (o->op_padix ? PAD_SVl(o->op_padix) : Nullsv)
 #define PADOP_gv(o)    ((o->op_padix \
                          && SvTYPE(PAD_SVl(o->op_padix)) == SVt_PVGV) \
-                        ? (GV*)PAD_SVl(o->op_padix) : Nullgv)
+                        ? (GV*)PAD_SVl(o->op_padix) : (GV *)NULL)
 
 MODULE = B     PACKAGE = B::PADOP              PREFIX = PADOP_
 

==== //depot/perl/ext/DynaLoader/dl_symbian.xs#4 (text) ====
Index: perl/ext/DynaLoader/dl_symbian.xs
--- perl/ext/DynaLoader/dl_symbian.xs#3~32703~  2007-12-22 08:17:01.000000000 
-0800
+++ perl/ext/DynaLoader/dl_symbian.xs   2008-01-23 01:22:01.000000000 -0800
@@ -78,7 +78,7 @@
         h = new PerlSymbianLibHandle;
         if (h) {
             h->error   = KErrNone;
-            h->symbols = Nullhv;
+            h->symbols = (HV *)NULL;
         } else
             error = KErrNoMemory;
     }

==== //depot/perl/gv.h#76 (text) ====
Index: perl/gv.h
--- perl/gv.h#75~32237~ 2007-11-07 15:23:27.000000000 -0800
+++ perl/gv.h   2008-01-23 01:22:01.000000000 -0800
@@ -176,7 +176,9 @@
 #undef  GV_UNIQUE_CHECK
 #endif
 
-#define Nullgv Null(GV*)
+#ifndef PERL_CORE
+#  define Nullgv Null(GV*)
+#endif
 
 #define DM_UID   0x003
 #define DM_RUID   0x001

==== //depot/perl/hv.h#122 (text) ====
Index: perl/hv.h
--- perl/hv.h#121~32860~        2008-01-05 13:36:22.000000000 -0800
+++ perl/hv.h   2008-01-23 01:22:01.000000000 -0800
@@ -165,6 +165,8 @@
 =for apidoc AmU||Nullhv
 Null HV pointer.
 
+(deprecated - use C<(HV *)NULL> instead)
+
 =head1 Hash Manipulation Functions
 
 =for apidoc Am|char*|HvNAME|HV* stash
@@ -230,8 +232,9 @@
 /* these hash entry flags ride on hent_klen (for use only in magic/tied HVs) */
 #define HEf_SVKEY      -2      /* hent_key is an SV* */
 
-
-#define Nullhv Null(HV*)
+#ifndef PERL_CORE
+#  define Nullhv Null(HV*)
+#endif
 #define HvARRAY(hv)    ((hv)->sv_u.svu_hash)
 #define HvFILL(hv)     ((XPVHV*)  SvANY(hv))->xhv_fill
 #define HvMAX(hv)      ((XPVHV*)  SvANY(hv))->xhv_max
@@ -300,7 +303,9 @@
 #define HvREHASH_on(hv)                (SvFLAGS(hv) |= SVphv_REHASH)
 #define HvREHASH_off(hv)       (SvFLAGS(hv) &= ~SVphv_REHASH)
 
-#define Nullhe Null(HE*)
+#ifndef PERL_CORE
+#  define Nullhe Null(HE*)
+#endif
 #define HeNEXT(he)             (he)->hent_next
 #define HeKEY_hek(he)          (he)->hent_hek
 #define HeKEY(he)              HEK_KEY(HeKEY_hek(he))
@@ -332,7 +337,9 @@
                                 &PL_sv_undef)
 #define HeSVKEY_set(he,sv)     ((HeKLEN(he) = HEf_SVKEY), (HeKEY_sv(he) = sv))
 
-#define Nullhek Null(HEK*)
+#ifndef PERL_CORE
+#  define Nullhek Null(HEK*)
+#endif
 #define HEK_BASESIZE           STRUCT_OFFSET(HEK, hek_key[0])
 #define HEK_HASH(hek)          (hek)->hek_hash
 #define HEK_LEN(hek)           (hek)->hek_len

==== //depot/perl/pod/perlapi.pod#314 (text+w) ====
Index: perl/pod/perlapi.pod
--- perl/pod/perlapi.pod#313~32982~     2008-01-16 04:12:10.000000000 -0800
+++ perl/pod/perlapi.pod        2008-01-23 01:22:01.000000000 -0800
@@ -1399,6 +1399,8 @@
 
 Null AV pointer.
 
+(deprecated - use C<(AV *)NULL> instead)
+
 =for hackers
 Found in file av.h
 
@@ -1415,6 +1417,8 @@
 
 Null CV pointer.
 
+(deprecated - use C<(CV *)NULL> instead)
+
 =for hackers
 Found in file cv.h
 
@@ -1423,6 +1427,8 @@
 
 Null HV pointer.
 
+(deprecated - use C<(HV *)NULL> instead)
+
 =for hackers
 Found in file hv.h
 
End of Patch.

Reply via email to