This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
s/Nullhv/NULL/g;
authorNicholas Clark <nick@ccl4.org>
Fri, 16 Dec 2005 21:54:13 +0000 (21:54 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 16 Dec 2005 21:54:13 +0000 (21:54 +0000)
# Although I see that Robin is proposing to add some :-)

p4raw-id: //depot/perl@26381

12 files changed:
cop.h
ext/Data/Dumper/Dumper.xs
ext/DynaLoader/dlutils.c
gv.c
op.c
op.h
pad.c
perl.c
sv.c
toke.c
universal.c
xsutils.c

diff --git a/cop.h b/cop.h
index 09858b2..eccb795 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -176,7 +176,7 @@ struct cop {
 #  endif
 
 #  define CopSTASH(c)          (CopSTASHPV(c) \
-                                ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv)
+                                ? gv_stashpv(CopSTASHPV(c),GV_ADD) : NULL)
 #  define CopSTASH_set(c,hv)   CopSTASHPV_set(c, (hv) ? HvNAME_get(hv) : Nullch)
 #  define CopSTASH_eq(c,hv)    ((hv) && stashpv_hvname_match(c,hv))
 #  ifdef NETWARE
index 109d249..a06698a 100644 (file)
@@ -929,7 +929,7 @@ Data_Dumper_Dumpxs(href, ...)
        {
            HV *hv;
            SV *retval, *valstr;
-           HV *seenhv = Nullhv;
+           HV *seenhv = NULL;
            AV *postav, *todumpav, *namesav;
            I32 level = 0;
            I32 indent, terse, i, imax, postlen;
@@ -966,7 +966,7 @@ Data_Dumper_Dumpxs(href, ...)
            }
 
            todumpav = namesav = NULL;
-           seenhv = Nullhv;
+           seenhv = NULL;
            val = pad = xpad = apad = sep = pair = varname
                = freezer = toaster = bless = sortkeys = &PL_sv_undef;
            name = sv_newmortal();
index 956848a..e9dd34a 100644 (file)
@@ -94,7 +94,7 @@ dl_generic_private_init(pTHX) /* called by dl_*.xs dl_private_init() */
     MY_CXT.x_dl_last_error = newSVpvn("", 0);
     dl_nonlazy = 0;
 #ifdef DL_LOADONCEONLY
-    dl_loaded_files = Nullhv;
+    dl_loaded_files = NULL;
 #endif
 #ifdef DEBUGGING
     {
diff --git a/gv.c b/gv.c
index af75bec..2b94c27 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -433,7 +433,7 @@ Perl_gv_fetchmethod_autoload(pTHX_ HV *stash, const char *name, I32 autoload)
     HV* ostash = stash;
 
     if (stash && SvTYPE(stash) < SVt_PVHV)
-       stash = Nullhv;
+       stash = NULL;
 
     for (nend = name; *nend; nend++) {
        if (*nend == '\'')
@@ -516,7 +516,7 @@ Perl_gv_autoload4(pTHX_ HV *stash, const char *name, STRLEN len, I32 method)
     if (stash) {
        if (SvTYPE(stash) < SVt_PVHV) {
            packname = SvPV_const((SV*)stash, packname_len);
-           stash = Nullhv;
+           stash = NULL;
        }
        else {
            packname = HvNAME_get(stash);
diff --git a/op.c b/op.c
index fa69bc0..42a2e28 100644 (file)
--- a/op.c
+++ b/op.c
@@ -259,7 +259,7 @@ Perl_allocmy(pTHX_ char *name)
                    (PL_in_my == KEY_our 
                        /* $_ is always in main::, even with our */
                        ? (PL_curstash && !strEQ(name,"$_") ? PL_curstash : PL_defstash)
-                       : Nullhv
+                       : NULL
                    ),
                    0 /*  not fake */
     );
@@ -1695,7 +1695,7 @@ S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp)
        } else if (attrs) {
            GV * const gv = cGVOPx_gv(cUNOPo->op_first);
            PL_in_my = FALSE;
-           PL_in_my_stash = Nullhv;
+           PL_in_my_stash = NULL;
            apply_attrs(GvSTASH(gv),
                        (type == OP_RV2SV ? GvSV(gv) :
                         type == OP_RV2AV ? (SV*)GvAV(gv) :
@@ -1719,7 +1719,7 @@ S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp)
        HV *stash;
 
        PL_in_my = FALSE;
-       PL_in_my_stash = Nullhv;
+       PL_in_my_stash = NULL;
 
        /* check for C<my Dog $spot> when deciding package */
        stash = PAD_COMPNAME_TYPE(o->op_targ);
@@ -1761,7 +1761,7 @@ Perl_my_attrs(pTHX_ OP *o, OP *attrs)
            o = append_list(OP_LIST, (LISTOP*)o, (LISTOP*)rops);
     }
     PL_in_my = FALSE;
-    PL_in_my_stash = Nullhv;
+    PL_in_my_stash = NULL;
     return o;
 }
 
@@ -2015,7 +2015,7 @@ Perl_localize(pTHX_ OP *o, I32 lex)
     else
        o = mod(o, OP_NULL);            /* a bit kludgey */
     PL_in_my = FALSE;
-    PL_in_my_stash = Nullhv;
+    PL_in_my_stash = NULL;
     return o;
 }
 
diff --git a/op.h b/op.h
index 5fbce83..caea112 100644 (file)
--- a/op.h
+++ b/op.h
@@ -334,7 +334,7 @@ struct pmop {
 #  define PmopSTASHPV(o)       ((o)->op_pmstashpv)
 #  define PmopSTASHPV_set(o,pv)        (PmopSTASHPV(o) = savesharedpv(pv))
 #  define PmopSTASH(o)         (PmopSTASHPV(o) \
-                                ? gv_stashpv(PmopSTASHPV(o),GV_ADD) : Nullhv)
+                                ? gv_stashpv(PmopSTASHPV(o),GV_ADD) : NULL)
 #  define PmopSTASH_set(o,hv)  PmopSTASHPV_set(o, ((hv) ? HvNAME_get(hv) : Nullch))
 #  define PmopSTASH_free(o)    PerlMemShared_free(PmopSTASHPV(o))
 
diff --git a/pad.c b/pad.c
index 7fb8921..ea2969d 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -827,9 +827,9 @@ S_pad_findlex(pTHX_ const char *name, const CV* cv, U32 seq, int warn,
        new_offset = pad_add_name(
            SvPVX_const(*out_name_sv),
            (SvFLAGS(*out_name_sv) & SVpad_TYPED)
-                   ? SvSTASH(*out_name_sv) : Nullhv,
+                   ? SvSTASH(*out_name_sv) : NULL,
            (SvFLAGS(*out_name_sv) & SVpad_OUR)
-                   ? GvSTASH(*out_name_sv) : Nullhv,
+                   ? GvSTASH(*out_name_sv) : NULL,
            1  /* fake */
        );
 
@@ -1627,7 +1627,7 @@ Perl_pad_compname_type(pTHX_ const PADOFFSET po)
     if ( SvFLAGS(*av) & SVpad_TYPED ) {
         return SvSTASH(*av);
     }
-    return Nullhv;
+    return NULL;
 }
 
 /*
diff --git a/perl.c b/perl.c
index 355b1a2..525abef 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -950,13 +950,13 @@ perl_destruct(pTHXx)
     PL_DBassertion = Nullsv;
     PL_DBcv = Nullcv;
     PL_dbargs = NULL;
-    PL_debstash = Nullhv;
+    PL_debstash = NULL;
 
     SvREFCNT_dec(PL_argvout_stack);
     PL_argvout_stack = NULL;
 
     SvREFCNT_dec(PL_modglobal);
-    PL_modglobal = Nullhv;
+    PL_modglobal = NULL;
     SvREFCNT_dec(PL_preambleav);
     PL_preambleav = NULL;
     SvREFCNT_dec(PL_subname);
@@ -965,7 +965,7 @@ perl_destruct(pTHXx)
     PL_linestr = Nullsv;
 #ifdef PERL_USES_PL_PIDSTATUS
     SvREFCNT_dec(PL_pidstatus);
-    PL_pidstatus = Nullhv;
+    PL_pidstatus = NULL;
 #endif
     SvREFCNT_dec(PL_toptarget);
     PL_toptarget = Nullsv;
@@ -2383,7 +2383,7 @@ Perl_get_hv(pTHX_ const char *name, I32 create)
        return GvHVn(gv);
     if (gv)
        return GvHV(gv);
-    return Nullhv;
+    return NULL;
 }
 
 /*
diff --git a/sv.c b/sv.c
index bb351f7..f918d5a 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -7261,7 +7261,7 @@ S_sv_unglob(pTHX_ SV *sv)
        gp_free((GV*)sv);
     if (GvSTASH(sv)) {
        sv_del_backref((SV*)GvSTASH(sv), sv);
-       GvSTASH(sv) = Nullhv;
+       GvSTASH(sv) = NULL;
     }
     sv_unmagic(sv, PERL_MAGIC_glob);
     Safefree(GvNAME(sv));
@@ -10580,7 +10580,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
 #endif
 
     /* swatch cache */
-    PL_last_swash_hv   = Nullhv;       /* reinits on demand */
+    PL_last_swash_hv   = NULL; /* reinits on demand */
     PL_last_swash_klen = 0;
     PL_last_swash_key[0]= '\0';
     PL_last_swash_tmps = (U8*)NULL;
diff --git a/toke.c b/toke.c
index 0a4452e..820b3b8 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -10829,7 +10829,7 @@ Perl_yyerror(pTHX_ const char *s)
             OutCopFILE(PL_curcop));
     }
     PL_in_my = 0;
-    PL_in_my_stash = Nullhv;
+    PL_in_my_stash = NULL;
     return 0;
 }
 #ifdef __SC__
index 10dddb5..824a4d5 100644 (file)
@@ -38,7 +38,7 @@ S_isa_lookup(pTHX_ HV *stash, const char *name, HV* name_stash,
     AV* av;
     GV* gv;
     GV** gvp;
-    HV* hv = Nullhv;
+    HV* hv = NULL;
     SV* subgen = Nullsv;
     const char *hvname;
 
@@ -141,7 +141,7 @@ bool
 Perl_sv_derived_from(pTHX_ SV *sv, const char *name)
 {
     const char *type = Nullch;
-    HV *stash = Nullhv;
+    HV *stash = NULL;
     HV *name_stash;
 
     SvGETMAGIC(sv);
index 8662008..518e543 100644 (file)
--- a/xsutils.c
+++ b/xsutils.c
@@ -265,7 +265,7 @@ usage:
        sv_setsv(TARG, &PL_sv_no);      /* unblessed lexical */
 #endif
     else {
-       const HV *stash = Nullhv;
+       const HV *stash = NULL;
        switch (SvTYPE(sv)) {
        case SVt_PVCV:
            if (CvGV(sv) && isGV(CvGV(sv)) && GvSTASH(CvGV(sv)))