From: Steven Schubiger Date: Thu, 2 Feb 2006 16:02:41 +0000 (+0100) Subject: s/Nullcv/NULL/g X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=601f18338612507d7579747105124d8ed063211e;p=p5sagit%2Fp5-mst-13.2.git s/Nullcv/NULL/g Message-ID: <20060202150241.GF12591@accognoscere.homeunix.org> Date: Thu, 2 Feb 2006 16:02:41 +0100 p4raw-id: //depot/perl@27060 --- diff --git a/cop.h b/cop.h index 7deceb6..55c0db9 100644 --- a/cop.h +++ b/cop.h @@ -347,7 +347,7 @@ struct block_eval { cx->blk_eval.old_namesv = (n ? newSVpv(n,0) : Nullsv); \ cx->blk_eval.old_eval_root = PL_eval_root; \ cx->blk_eval.cur_text = PL_linestr; \ - cx->blk_eval.cv = Nullcv; /* set by doeval(), as applicable */ \ + cx->blk_eval.cv = NULL; /* set by doeval(), as applicable */ \ cx->blk_eval.retop = Nullop; \ cx->blk_eval.cur_top_env = PL_top_env; \ } STMT_END diff --git a/dump.c b/dump.c index 088e860..0612a9c 100644 --- a/dump.c +++ b/dump.c @@ -1695,7 +1695,7 @@ S_deb_curcv(pTHX_ I32 ix) else if (ix == 0 && PL_curstackinfo->si_type == PERLSI_MAIN) return PL_main_cv; else if (ix <= 0) - return Nullcv; + return NULL; else return deb_curcv(ix - 1); } diff --git a/gv.c b/gv.c index 251d861..d06bb8d 100644 --- a/gv.c +++ b/gv.c @@ -324,7 +324,7 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) return topgv; /* Stale cached entry: junk it */ SvREFCNT_dec(cv); - GvCV(topgv) = cv = Nullcv; + GvCV(topgv) = cv = NULL; GvCVGEN(topgv) = 0; } else if (GvCVGEN(topgv) == PL_sub_generation) @@ -1356,7 +1356,7 @@ Perl_gp_ref(pTHX_ GP *gp) if (gp->gp_cvgen) { /* multi-named GPs cannot be used for method cache */ SvREFCNT_dec(gp->gp_cv); - gp->gp_cv = Nullcv; + gp->gp_cv = NULL; gp->gp_cvgen = 0; } else { @@ -1421,9 +1421,9 @@ Perl_magic_freeovrld(pTHX_ SV *sv, MAGIC *mg) int i; for (i = 1; i < NofAMmeth; i++) { CV * const cv = amtp->table[i]; - if (cv != Nullcv) { + if (cv != NULL) { SvREFCNT_dec((SV *) cv); - amtp->table[i] = Nullcv; + amtp->table[i] = NULL; } } } @@ -1477,7 +1477,7 @@ Perl_Gv_AMupdate(pTHX_ HV *stash) amt.fallback=AMGfallNEVER; for (i = 1; i < lim; i++) - amt.table[i] = Nullcv; + amt.table[i] = NULL; for (; i < NofAMmeth; i++) { const char * const cooky = PL_AMG_names[i]; /* Human-readable form, for debugging: */ @@ -1563,7 +1563,7 @@ Perl_gv_handler(pTHX_ HV *stash, I32 id) AMT *amtp; if (!stash || !HvNAME_get(stash)) - return Nullcv; + return NULL; mg = mg_find((SV*)stash, PERL_MAGIC_overload_table); if (!mg) { do_update: @@ -1589,7 +1589,7 @@ Perl_gv_handler(pTHX_ HV *stash, I32 id) return ret; } - return Nullcv; + return NULL; } diff --git a/gv.h b/gv.h index 7bd16cd..29d1bfc 100644 --- a/gv.h +++ b/gv.h @@ -84,7 +84,7 @@ Return the SV from the GV. #define GvCV(gv) (GvGP(gv)->gp_cv) #define GvCVGEN(gv) (GvGP(gv)->gp_cvgen) -#define GvCVu(gv) (GvGP(gv)->gp_cvgen ? Nullcv : GvGP(gv)->gp_cv) +#define GvCVu(gv) (GvGP(gv)->gp_cvgen ? NULL : GvGP(gv)->gp_cv) #define GvLINE(gv) (GvGP(gv)->gp_line) #define GvFILE(gv) (GvGP(gv)->gp_file) diff --git a/mg.c b/mg.c index a6b4e2f..2557885 100644 --- a/mg.c +++ b/mg.c @@ -2623,7 +2623,7 @@ Perl_sighandler(int sig) GV *gv = Nullgv; SV *sv = Nullsv; SV * const tSv = PL_Sv; - CV *cv = Nullcv; + CV *cv = NULL; OP *myop = PL_op; U32 flags = 0; XPV * const tXpv = PL_Xpv; diff --git a/op.c b/op.c index 6c9b53f..51315e4 100644 --- a/op.c +++ b/op.c @@ -4290,7 +4290,7 @@ Perl_cv_undef(pTHX_ CV *cv) if (!SvREFCNT(cv) && CvOUTSIDE(cv)) { if (!CvWEAKOUTSIDE(cv)) SvREFCNT_dec(CvOUTSIDE(cv)); - CvOUTSIDE(cv) = Nullcv; + CvOUTSIDE(cv) = NULL; } if (CvCONST(cv)) { SvREFCNT_dec((SV*)CvXSUBANY(cv).any_ptr); @@ -4522,7 +4522,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) goto done; } - cv = (!name || GvCVGEN(gv)) ? Nullcv : GvCV(gv); + cv = (!name || GvCVGEN(gv)) ? NULL : GvCV(gv); #ifdef GV_UNIQUE_CHECK if (cv && GvUNIQUE(gv) && SvREADONLY(cv)) { @@ -4533,7 +4533,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) if (!block || !ps || *ps || attrs || (CvFLAGS(PL_compcv) & CVf_BUILTIN_ATTRS)) const_sv = Nullsv; else - const_sv = op_const_sv(block, Nullcv); + const_sv = op_const_sv(block, NULL); if (cv) { const bool exists = CvROOT(cv) || CvXSUB(cv); @@ -4575,7 +4575,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) CopLINE_set(PL_curcop, oldline); } SvREFCNT_dec(cv); - cv = Nullcv; + cv = NULL; } } } @@ -4589,7 +4589,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) CvCONST_on(cv); } else { - GvCV(gv) = Nullcv; + GvCV(gv) = NULL; cv = newCONSTSUB(NULL, name, const_sv); } op_free(block); @@ -4869,11 +4869,11 @@ Perl_newXS(pTHX_ const char *name, XSUBADDR_t subaddr, const char *filename) if (!subaddr) Perl_croak(aTHX_ "panic: no address for '%s' in '%s'", name, filename); - if ((cv = (name ? GvCV(gv) : Nullcv))) { + if ((cv = (name ? GvCV(gv) : NULL))) { if (GvCVGEN(gv)) { /* just a cached method */ SvREFCNT_dec(cv); - cv = Nullcv; + cv = NULL; } else if (CvROOT(cv) || CvXSUB(cv) || GvASSUMECV(gv)) { /* already defined (or promised) */ @@ -4898,7 +4898,7 @@ Perl_newXS(pTHX_ const char *name, XSUBADDR_t subaddr, const char *filename) } } SvREFCNT_dec(cv); - cv = Nullcv; + cv = NULL; } } diff --git a/pad.c b/pad.c index c17bcf6..baf518e 100644 --- a/pad.c +++ b/pad.c @@ -284,7 +284,7 @@ Perl_pad_undef(pTHX_ CV* cv) (void)SvREFCNT_inc(outercv); } else { - CvOUTSIDE(innercv) = Nullcv; + CvOUTSIDE(innercv) = NULL; } } diff --git a/perl.c b/perl.c index 26382e9..4718aa5 100644 --- a/perl.c +++ b/perl.c @@ -726,7 +726,7 @@ perl_destruct(pTHXx) } PL_main_start = Nullop; SvREFCNT_dec(PL_main_cv); - PL_main_cv = Nullcv; + PL_main_cv = NULL; PL_dirty = TRUE; /* Tell PerlIO we are about to tear things apart in case @@ -942,7 +942,7 @@ perl_destruct(pTHXx) PL_DBtrace = Nullsv; PL_DBsignal = Nullsv; PL_DBassertion = Nullsv; - PL_DBcv = Nullcv; + PL_DBcv = NULL; PL_dbargs = NULL; PL_debstash = NULL; @@ -1542,7 +1542,7 @@ setuid perl scripts securely.\n"); } PL_main_start = Nullop; SvREFCNT_dec(PL_main_cv); - PL_main_cv = Nullcv; + PL_main_cv = NULL; time(&PL_basetime); oldscope = PL_scopestack_ix; @@ -2416,7 +2416,7 @@ Perl_get_cv(pTHX_ const char *name, I32 create) Nullop); if (gv) return GvCVu(gv); - return Nullcv; + return NULL; } /* Be sure to refetch the stack pointer after calling these routines. */ diff --git a/pp_ctl.c b/pp_ctl.c index c8b4870..7c08c77 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2751,7 +2751,7 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, const char *code, PAD** padp) char *tmpbuf = tbuf; char *safestr; int runtime; - CV* runcv = Nullcv; /* initialise to avoid compiler warnings */ + CV* runcv = NULL; /* initialise to avoid compiler warnings */ STRLEN len; ENTER; @@ -3406,7 +3406,7 @@ PP(pp_require) encoding = PL_encoding; PL_encoding = NULL; - op = DOCATCH(doeval(gimme, NULL, Nullcv, PL_curcop->cop_seq)); + op = DOCATCH(doeval(gimme, NULL, NULL, PL_curcop->cop_seq)); /* Restore encoding. */ PL_encoding = encoding; diff --git a/sv.c b/sv.c index 8778904..2b2f188 100644 --- a/sv.c +++ b/sv.c @@ -3002,7 +3002,7 @@ S_pvgv_assign(pTHX_ SV *dstr, SV *sstr) { if (intro) { if (GvCVGEN(dstr) && GvCV(dstr) != (CV*)sref) { SvREFCNT_dec(GvCV(dstr)); - GvCV(dstr) = Nullcv; + GvCV(dstr) = NULL; GvCVGEN(dstr) = 0; /* Switch off cacheness. */ PL_sub_generation++; } @@ -6873,10 +6873,10 @@ Perl_sv_2cv(pTHX_ SV *sv, HV **st, GV **gvp, I32 lref) { dVAR; GV *gv = Nullgv; - CV *cv = Nullcv; + CV *cv = NULL; if (!sv) - return *st = NULL, *gvp = Nullgv, Nullcv; + return *st = NULL, *gvp = Nullgv, NULL; switch (SvTYPE(sv)) { case SVt_PVCV: *st = CvSTASH(sv); @@ -6886,7 +6886,7 @@ Perl_sv_2cv(pTHX_ SV *sv, HV **st, GV **gvp, I32 lref) case SVt_PVAV: *st = NULL; *gvp = Nullgv; - return Nullcv; + return NULL; case SVt_PVGV: gv = (GV*)sv; *gvp = gv; @@ -6918,7 +6918,7 @@ Perl_sv_2cv(pTHX_ SV *sv, HV **st, GV **gvp, I32 lref) *gvp = gv; if (!gv) { *st = NULL; - return Nullcv; + return NULL; } /* Some flags to gv_fetchsv mean don't really create the GV */ if (SvTYPE(gv) != SVt_PVGV) {