summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-02-20 09:26:15 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-02-20 09:26:15 +0000
commit4608196e45589eea5792cff92b551109899ddb06 (patch)
tree584bcc5d3498ebc1d76f0afe65ce7c97e95768b5
parentbcb11275f9e8e4324ef33449c82bea92e44f6386 (diff)
downloadperl-4608196e45589eea5792cff92b551109899ddb06.tar.gz
More NullXXX macro removal from Andy Lester
p4raw-id: //depot/perl@27238
-rw-r--r--cop.h2
-rw-r--r--deb.c6
-rw-r--r--doio.c28
-rw-r--r--doop.c2
-rw-r--r--hv.c20
-rw-r--r--intrpvar.h2
-rw-r--r--mg.h3
-rw-r--r--pad.c10
-rw-r--r--pad.h8
-rw-r--r--perl.c4
-rw-r--r--pp_ctl.c12
-rw-r--r--pp_hot.c10
-rw-r--r--pp_sys.c16
-rw-r--r--scope.c6
-rw-r--r--sv.c18
-rw-r--r--toke.c6
-rw-r--r--universal.c2
-rw-r--r--util.c20
18 files changed, 86 insertions, 89 deletions
diff --git a/cop.h b/cop.h
index f0429b17a9..92a61df96f 100644
--- a/cop.h
+++ b/cop.h
@@ -542,7 +542,7 @@ struct subst {
cx->sb_s = s, \
cx->sb_m = m, \
cx->sb_strend = strend, \
- cx->sb_rxres = Null(void*), \
+ cx->sb_rxres = NULL, \
cx->sb_rx = rx, \
cx->cx_type = CXt_SUBST; \
rxres_save(&cx->sb_rxres, rx)
diff --git a/deb.c b/deb.c
index df2ccffaa4..e246b1aa34 100644
--- a/deb.c
+++ b/deb.c
@@ -225,11 +225,9 @@ Perl_deb_stack_all(pTHX)
*/
I32 i, stack_min, stack_max, mark_min, mark_max;
- const PERL_CONTEXT *cx_n;
+ const PERL_CONTEXT *cx_n = NULL;
const PERL_SI *si_n;
- cx_n = Null(PERL_CONTEXT*);
-
/* there's a separate stack per SI, so only search
* this one */
@@ -257,7 +255,7 @@ Perl_deb_stack_all(pTHX)
si_n = si;
i = ix;
- cx_n = Null(PERL_CONTEXT*);
+ cx_n = NULL;
for (;;) {
i++;
if (i > si_n->si_cxix) {
diff --git a/doio.c b/doio.c
index dfd48d2d8b..00c29b1937 100644
--- a/doio.c
+++ b/doio.c
@@ -65,8 +65,8 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw,
{
dVAR;
register IO * const io = GvIOn(gv);
- PerlIO *saveifp = Nullfp;
- PerlIO *saveofp = Nullfp;
+ PerlIO *saveifp = NULL;
+ PerlIO *saveofp = NULL;
int savefd = -1;
char savetype = IoTYPE_CLOSED;
int writing = 0;
@@ -125,7 +125,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw,
"Warning: unable to close filehandle %s properly.\n",
GvENAME(gv));
}
- IoOFP(io) = IoIFP(io) = Nullfp;
+ IoOFP(io) = IoIFP(io) = NULL;
}
if (as_raw) {
@@ -704,7 +704,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw,
*s = 'w';
if (!(IoOFP(io) = PerlIO_openn(aTHX_ type,s,fd,0,0,NULL,0,svp))) {
PerlIO_close(fp);
- IoIFP(io) = Nullfp;
+ IoIFP(io) = NULL;
goto say_false;
}
}
@@ -755,7 +755,7 @@ Perl_nextargv(pTHX_ register GV *gv)
PL_lastfd = -1;
PL_filemode = 0;
if (!GvAV(gv))
- return Nullfp;
+ return NULL;
while (av_len(GvAV(gv)) >= 0) {
STRLEN oldlen;
sv = av_shift(GvAV(gv));
@@ -763,7 +763,7 @@ Perl_nextargv(pTHX_ register GV *gv)
sv_setsv(GvSVn(gv),sv);
SvSETMAGIC(GvSV(gv));
PL_oldname = SvPVx(GvSV(gv), oldlen);
- if (do_open(gv,PL_oldname,oldlen,PL_inplace!=0,O_RDONLY,0,Nullfp)) {
+ if (do_open(gv,PL_oldname,oldlen,PL_inplace!=0,O_RDONLY,0,NULL)) {
if (PL_inplace) {
TAINT_PROPER("inplace open");
if (oldlen == 1 && *PL_oldname == '-') {
@@ -834,7 +834,7 @@ Perl_nextargv(pTHX_ register GV *gv)
(void)PerlLIO_unlink(SvPVX_const(sv));
(void)PerlLIO_rename(PL_oldname,SvPVX_const(sv));
do_open(gv,(char*)SvPVX_const(sv),SvCUR(sv),PL_inplace!=0,
- O_RDONLY,0,Nullfp);
+ O_RDONLY,0,NULL);
#endif /* DOSISH */
#else
(void)UNLINK(SvPVX_const(sv));
@@ -871,11 +871,11 @@ Perl_nextargv(pTHX_ register GV *gv)
SETERRNO(0,0); /* in case sprintf set errno */
#ifdef VMS
if (!do_open(PL_argvoutgv,(char*)SvPVX_const(sv),SvCUR(sv),
- PL_inplace!=0,O_WRONLY|O_CREAT|O_TRUNC,0,Nullfp))
+ PL_inplace!=0,O_WRONLY|O_CREAT|O_TRUNC,0,NULL))
#else
if (!do_open(PL_argvoutgv,(char*)SvPVX_const(sv),SvCUR(sv),
PL_inplace!=0,O_WRONLY|O_CREAT|OPEN_EXCL,0666,
- Nullfp))
+ NULL))
#endif
{
if (ckWARN_d(WARN_INPLACE))
@@ -933,11 +933,11 @@ Perl_nextargv(pTHX_ register GV *gv)
GV *oldout = (GV*)av_pop(PL_argvout_stack);
setdefout(oldout);
SvREFCNT_dec(oldout);
- return Nullfp;
+ return NULL;
}
setdefout(gv_fetchpvs("STDOUT", GV_ADD|GV_NOTQUAL, SVt_PVIO));
}
- return Nullfp;
+ return NULL;
}
/* explicit renamed to avoid C++ conflict -- kja */
@@ -1004,7 +1004,7 @@ Perl_io_close(pTHX_ IO *io, bool not_implicit)
retval = (PerlIO_close(IoIFP(io)) != EOF && !prev_err);
}
}
- IoOFP(io) = IoIFP(io) = Nullfp;
+ IoOFP(io) = IoIFP(io) = NULL;
}
else if (not_implicit) {
SETERRNO(EBADF,SS_IVCHAN);
@@ -1425,7 +1425,7 @@ Perl_do_execfree(pTHX)
{
dVAR;
Safefree(PL_Argv);
- PL_Argv = Null(char **);
+ PL_Argv = NULL;
Safefree(PL_Cmd);
PL_Cmd = NULL;
}
@@ -2439,7 +2439,7 @@ Perl_start_glob (pTHX_ SV *tmpglob, IO *io)
#endif /* !DOSISH */
#endif /* MACOS_TRADITIONAL */
(void)do_open(PL_last_in_gv, (char*)SvPVX_const(tmpcmd), SvCUR(tmpcmd),
- FALSE, O_RDONLY, 0, Nullfp);
+ FALSE, O_RDONLY, 0, NULL);
fp = IoIFP(io);
#endif /* !VMS */
LEAVE;
diff --git a/doop.c b/doop.c
index 847b18ee9a..0e9ddf1260 100644
--- a/doop.c
+++ b/doop.c
@@ -722,7 +722,7 @@ Perl_do_sprintf(pTHX_ SV *sv, I32 len, SV **sarg)
SvUTF8_off(sv);
if (DO_UTF8(*sarg))
SvUTF8_on(sv);
- sv_vsetpvfn(sv, pat, patlen, Null(va_list*), sarg + 1, len - 1, &do_taint);
+ sv_vsetpvfn(sv, pat, patlen, NULL, sarg + 1, len - 1, &do_taint);
SvSETMAGIC(sv);
if (do_taint)
SvTAINTED_on(sv);
diff --git a/hv.c b/hv.c
index 6be56dba4f..f68f38c56c 100644
--- a/hv.c
+++ b/hv.c
@@ -124,7 +124,7 @@ Perl_free_tied_hv_pool(pTHX)
he = HeNEXT(he);
del_HE(ohe);
}
- PL_hv_fetch_ent_mh = Nullhe;
+ PL_hv_fetch_ent_mh = NULL;
}
#if defined(USE_ITHREADS)
@@ -154,7 +154,7 @@ Perl_he_dup(pTHX_ const HE *e, bool shared, CLONE_PARAMS* param)
HE *ret;
if (!e)
- return Nullhe;
+ return NULL;
/* look for it in the table first */
ret = (HE*)ptr_table_fetch(PL_ptr_table, e);
if (ret)
@@ -473,7 +473,7 @@ S_hv_fetch_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
Newx(k, HEK_BASESIZE + sizeof(SV*), char);
HeKEY_hek(entry) = (HEK*)k;
}
- HeNEXT(entry) = Nullhe;
+ HeNEXT(entry) = NULL;
HeSVKEY_set(entry, keysv);
HeVAL(entry) = sv;
sv_upgrade(sv, SVt_PVLV);
@@ -585,7 +585,7 @@ S_hv_fetch_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
if (!HvARRAY(hv) && !needs_store) {
if (flags & HVhek_FREEKEY)
Safefree(key);
- return Nullhe;
+ return NULL;
}
#ifdef ENV_IS_CASELESS
else if (mg_find((SV*)hv, PERL_MAGIC_env)) {
@@ -668,7 +668,7 @@ S_hv_fetch_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
masked_flags = (flags & HVhek_MASK);
#ifdef DYNAMIC_ENV_FETCH
- if (!HvARRAY(hv)) entry = Null(HE*);
+ if (!HvARRAY(hv)) entry = NULL;
else
#endif
{
@@ -1718,7 +1718,7 @@ S_hfreeentries(pTHX_ HV *hv)
hv_free_ent(hv, entry);
}
iter->xhv_riter = -1; /* HvRITER(hv) = -1 */
- iter->xhv_eiter = Null(HE*); /* HvEITER(hv) = Null(HE*) */
+ iter->xhv_eiter = NULL; /* HvEITER(hv) = NULL */
/* There are now no allocated pointers in the aux structure. */
@@ -1838,7 +1838,7 @@ S_hv_auxinit(HV *hv) {
iter = HvAUX(hv);
iter->xhv_riter = -1; /* HvRITER(hv) = -1 */
- iter->xhv_eiter = Null(HE*); /* HvEITER(hv) = Null(HE*) */
+ iter->xhv_eiter = NULL; /* HvEITER(hv) = NULL */
iter->xhv_name = 0;
iter->xhv_backreferences = 0;
return iter;
@@ -1873,7 +1873,7 @@ Perl_hv_iterinit(pTHX_ HV *hv)
hv_free_ent(hv, entry);
}
iter->xhv_riter = -1; /* HvRITER(hv) = -1 */
- iter->xhv_eiter = Null(HE*); /* HvEITER(hv) = Null(HE*) */
+ iter->xhv_eiter = NULL; /* HvEITER(hv) = NULL */
} else {
hv_auxinit(hv);
}
@@ -2068,8 +2068,8 @@ Perl_hv_iternext_flags(pTHX_ HV *hv, I32 flags)
SvREFCNT_dec(HeVAL(entry));
Safefree(HeKEY_hek(entry));
del_HE(entry);
- iter->xhv_eiter = Null(HE*); /* HvEITER(hv) = Null(HE*) */
- return Null(HE*);
+ iter->xhv_eiter = NULL; /* HvEITER(hv) = NULL */
+ return NULL;
}
#ifdef DYNAMIC_ENV_FETCH /* set up %ENV for iteration */
if (!entry && SvRMAGICAL((SV*)hv) && mg_find((SV*)hv, PERL_MAGIC_env)) {
diff --git a/intrpvar.h b/intrpvar.h
index 79ad7de40d..4c63b08042 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -203,7 +203,7 @@ PERLVAR(Imodglobal, HV *) /* per-interp module data */
/* these used to be in global before 5.004_68 */
PERLVARI(Iprofiledata, U32 *, NULL) /* table of ops, counts */
-PERLVARI(Irsfp, PerlIO * VOL, Nullfp) /* current source file pointer */
+PERLVARI(Irsfp, PerlIO * VOL, NULL) /* current source file pointer */
PERLVARI(Irsfp_filters, AV *, NULL) /* keeps active source filters */
PERLVAR(Icompiling, COP) /* compiling/done executing marker */
diff --git a/mg.h b/mg.h
index a373defc99..2e1237446b 100644
--- a/mg.h
+++ b/mg.h
@@ -57,7 +57,6 @@ struct magic {
SvPV_nolen_const((SV*)((mg)->mg_ptr)) : \
(const char*)(mg)->mg_ptr)
-#define SvTIED_mg(sv,how) \
- (SvRMAGICAL(sv) ? mg_find((sv),(how)) : Null(MAGIC*))
+#define SvTIED_mg(sv,how) (SvRMAGICAL(sv) ? mg_find((sv),(how)) : NULL)
#define SvTIED_obj(sv,mg) \
((mg)->mg_obj ? (mg)->mg_obj : sv_2mortal(newRV(sv)))
diff --git a/pad.c b/pad.c
index 50fa42c420..aa806ea95a 100644
--- a/pad.c
+++ b/pad.c
@@ -307,7 +307,7 @@ Perl_pad_undef(pTHX_ CV* cv)
SvREFCNT_dec(sv);
}
SvREFCNT_dec((SV*)CvPADLIST(cv));
- CvPADLIST(cv) = Null(PADLIST*);
+ CvPADLIST(cv) = NULL;
}
@@ -587,7 +587,7 @@ Perl_pad_findmy(pTHX_ const char *name)
SV **name_svp;
offset = pad_findlex(name, PL_compcv, PL_cop_seqmax, 1,
- Null(SV**), &out_sv, &out_flags);
+ NULL, &out_sv, &out_flags);
if (offset != NOT_IN_PAD)
return offset;
@@ -622,7 +622,7 @@ Perl_find_rundefsvoffset(pTHX)
SV *out_sv;
int out_flags;
return pad_findlex("$_", find_runcv(NULL), PL_curcop->cop_seq, 1,
- Null(SV**), &out_sv, &out_flags);
+ NULL, &out_sv, &out_flags);
}
/*
@@ -812,7 +812,7 @@ S_pad_findlex(pTHX_ const char *name, const CV* cv, U32 seq, int warn,
/* out_capture non-null means caller wants us to capture lex; in
* addition we capture ourselves unless it's an ANON/format */
new_capturep = out_capture ? out_capture :
- CvLATE(cv) ? Null(SV**) : &new_capture;
+ CvLATE(cv) ? NULL : &new_capture;
offset = pad_findlex(name, CvOUTSIDE(cv), CvOUTSIDE_SEQ(cv), 1,
new_capturep, out_name_sv, out_flags);
@@ -867,7 +867,7 @@ S_pad_findlex(pTHX_ const char *name, const CV* cv, U32 seq, int warn,
PL_comppad_name = ocomppad_name;
PL_comppad = ocomppad;
- PL_curpad = ocomppad ? AvARRAY(ocomppad) : Null(SV **);
+ PL_curpad = ocomppad ? AvARRAY(ocomppad) : NULL;
}
return new_offset;
}
diff --git a/pad.h b/pad.h
index 01370fecfd..62d4fb1d30 100644
--- a/pad.h
+++ b/pad.h
@@ -155,20 +155,20 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL()
#define PAD_SAVE_SETNULLPAD() SAVECOMPPAD(); \
- PL_comppad = Null(PAD*); PL_curpad = Null(SV**); \
+ PL_comppad = NULL; PL_curpad = NULL; \
DEBUG_Xv(PerlIO_printf(Perl_debug_log, "Pad set_null\n"));
#define PAD_SAVE_LOCAL(opad,npad) \
opad = PL_comppad; \
PL_comppad = (npad); \
- PL_curpad = PL_comppad ? AvARRAY(PL_comppad) : Null(SV**); \
+ PL_curpad = PL_comppad ? AvARRAY(PL_comppad) : NULL; \
DEBUG_Xv(PerlIO_printf(Perl_debug_log, \
"Pad 0x%"UVxf"[0x%"UVxf"] save_local\n", \
PTR2UV(PL_comppad), PTR2UV(PL_curpad)));
#define PAD_RESTORE_LOCAL(opad) \
PL_comppad = opad; \
- PL_curpad = PL_comppad ? AvARRAY(PL_comppad) : Null(SV**); \
+ PL_curpad = PL_comppad ? AvARRAY(PL_comppad) : NULL; \
DEBUG_Xv(PerlIO_printf(Perl_debug_log, \
"Pad 0x%"UVxf"[0x%"UVxf"] restore_local\n", \
PTR2UV(PL_comppad), PTR2UV(PL_curpad)));
@@ -264,7 +264,7 @@ Clone the state variables associated with running and compiling pads.
#define PAD_CLONE_VARS(proto_perl, param) \
PL_comppad = (AV *) ptr_table_fetch(PL_ptr_table, proto_perl->Icomppad); \
- PL_curpad = PL_comppad ? AvARRAY(PL_comppad) : Null(SV**); \
+ PL_curpad = PL_comppad ? AvARRAY(PL_comppad) : NULL; \
PL_comppad_name = av_dup(proto_perl->Icomppad_name, param); \
PL_comppad_name_fill = proto_perl->Icomppad_name_fill; \
PL_comppad_name_floor = proto_perl->Icomppad_name_floor; \
diff --git a/perl.c b/perl.c
index 554e312727..b970bf348a 100644
--- a/perl.c
+++ b/perl.c
@@ -852,7 +852,7 @@ perl_destruct(pTHXx)
if(PL_rsfp) {
(void)PerlIO_close(PL_rsfp);
- PL_rsfp = Nullfp;
+ PL_rsfp = NULL;
}
/* Filters for program text */
@@ -4491,7 +4491,7 @@ S_init_lexer(pTHX)
dVAR;
PerlIO *tmpfp;
tmpfp = PL_rsfp;
- PL_rsfp = Nullfp;
+ PL_rsfp = NULL;
lex_start(PL_linestr);
PL_rsfp = tmpfp;
PL_subname = newSVpvs("main");
diff --git a/pp_ctl.c b/pp_ctl.c
index 4833218adf..725920f296 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -75,7 +75,7 @@ PP(pp_regcomp)
dSP;
register PMOP *pm = (PMOP*)cLOGOP->op_other;
SV *tmpstr;
- MAGIC *mg = Null(MAGIC*);
+ MAGIC *mg = NULL;
/* prevent recompiling under /o and ithreads. */
#if defined(USE_ITHREADS)
@@ -133,7 +133,7 @@ PP(pp_regcomp)
{
if (PM_GETRE(pm)) {
ReREFCNT_dec(PM_GETRE(pm));
- PM_SETRE(pm, Null(REGEXP*)); /* crucial if regcomp aborts */
+ PM_SETRE(pm, NULL); /* crucial if regcomp aborts */
}
if (PL_op->op_flags & OPf_SPECIAL)
PL_reginterp_cnt = I32_MAX; /* Mark as safe. */
@@ -383,7 +383,7 @@ Perl_rxres_free(pTHX_ void **rsp)
}
#endif
Safefree(p);
- *rsp = Null(void*);
+ *rsp = NULL;
}
}
@@ -3018,7 +3018,7 @@ S_check_type_and_open(pTHX_ const char *name, const char *mode)
Stat_t st;
const int st_rc = PerlLIO_stat(name, &st);
if (st_rc < 0) {
- return Nullfp;
+ return NULL;
}
if(S_ISDIR(st.st_mode) || S_ISBLK(st.st_mode)) {
@@ -3209,8 +3209,8 @@ PP(pp_require)
if (IoOFP(io) && IoOFP(io) != IoIFP(io)) {
PerlIO_close(IoOFP(io));
}
- IoIFP(io) = Nullfp;
- IoOFP(io) = Nullfp;
+ IoIFP(io) = NULL;
+ IoOFP(io) = NULL;
}
}
diff --git a/pp_hot.c b/pp_hot.c
index 8f11e004be..677808f3f9 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1070,8 +1070,8 @@ PP(pp_aassign)
relem = firstrelem;
lelem = firstlelem;
- ary = Null(AV*);
- hash = Null(HV*);
+ ary = NULL;
+ hash = NULL;
while (lelem <= lastlelem) {
TAINT_NOT; /* Each item stands on its own, taintwise. */
@@ -1555,7 +1555,7 @@ Perl_do_readline(pTHX)
RETURN;
}
}
- fp = Nullfp;
+ fp = NULL;
if (io) {
fp = IoIFP(io);
if (!fp) {
@@ -1564,7 +1564,7 @@ Perl_do_readline(pTHX)
IoLINES(io) = 0;
if (av_len(GvAVn(PL_last_in_gv)) < 0) {
IoFLAGS(io) &= ~IOf_START;
- do_open(PL_last_in_gv,"-",1,FALSE,O_RDONLY,0,Nullfp);
+ do_open(PL_last_in_gv,"-",1,FALSE,O_RDONLY,0,NULL);
sv_setpvn(GvSVn(PL_last_in_gv), "-", 1);
SvSETMAGIC(GvSV(PL_last_in_gv));
fp = IoIFP(io);
@@ -3033,7 +3033,7 @@ PP(pp_method)
}
}
- SETs(method_common(sv, Null(U32*)));
+ SETs(method_common(sv, NULL));
RETURN;
}
diff --git a/pp_sys.c b/pp_sys.c
index 5437c627a3..d6055f255d 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -564,7 +564,7 @@ PP(pp_open)
}
tmps = SvPV_const(sv, len);
- ok = do_openn(gv, tmps, len, FALSE, O_RDONLY, 0, Nullfp, MARK+1, (SP-MARK));
+ ok = do_openn(gv, tmps, len, FALSE, O_RDONLY, 0, NULL, MARK+1, (SP-MARK));
SP = ORIGMARK;
if (ok)
PUSHi( (I32)PL_forkprocess );
@@ -1070,7 +1070,7 @@ PP(pp_sselect)
timebuf.tv_usec = (long)(value * 1000000.0);
}
else
- tbuf = Null(struct timeval*);
+ tbuf = NULL;
for (i = 1; i <= 3; i++) {
sv = SP[i];
@@ -1511,7 +1511,7 @@ PP(pp_sysopen)
/* Need TIEHANDLE method ? */
const char * const tmps = SvPV_const(sv, len);
/* FIXME? do_open should do const */
- if (do_open(gv, tmps, len, TRUE, mode, perm, Nullfp)) {
+ if (do_open(gv, tmps, len, TRUE, mode, perm, NULL)) {
IoLINES(GvIOp(gv)) = 0;
PUSHs(&PL_sv_yes);
}
@@ -1942,7 +1942,7 @@ PP(pp_eof)
if ((IoFLAGS(io) & IOf_START) && av_len(GvAVn(gv)) < 0) {
IoLINES(io) = 0;
IoFLAGS(io) &= ~IOf_START;
- do_open(gv, "-", 1, FALSE, O_RDONLY, 0, Nullfp);
+ do_open(gv, "-", 1, FALSE, O_RDONLY, 0, NULL);
sv_setpvn(GvSV(gv), "-", 1);
SvSETMAGIC(GvSV(gv));
}
@@ -2162,7 +2162,7 @@ PP(pp_ioctl)
const unsigned int func = POPu;
const int optype = PL_op->op_type;
GV * const gv = (GV*)POPs;
- IO * const io = gv ? GvIOn(gv) : Null(IO*);
+ IO * const io = gv ? GvIOn(gv) : NULL;
char *s;
IV retval;
@@ -2243,7 +2243,7 @@ PP(pp_flock)
if (gv && (io = GvIO(gv)))
fp = IoIFP(io);
else {
- fp = Nullfp;
+ fp = NULL;
io = NULL;
}
/* XXX Looks to me like io is always NULL at this point */
@@ -4241,9 +4241,9 @@ PP(pp_time)
{
dVAR; dSP; dTARGET;
#ifdef BIG_TIME
- XPUSHn( time(Null(Time_t*)) );
+ XPUSHn( time(NULL) );
#else
- XPUSHi( time(Null(Time_t*)) );
+ XPUSHi( time(NULL) );
#endif
RETURN;
}
diff --git a/scope.c b/scope.c
index 5939877a3f..afb8678013 100644
--- a/scope.c
+++ b/scope.c
@@ -296,7 +296,7 @@ Perl_save_ary(pTHX_ GV *gv)
SSPUSHPTR(oav);
SSPUSHINT(SAVEt_AV);
- GvAV(gv) = Null(AV*);
+ GvAV(gv) = NULL;
av = GvAVn(gv);
if (SvMAGIC(oav))
mg_localize((SV*)oav, (SV*)av);
@@ -314,7 +314,7 @@ Perl_save_hash(pTHX_ GV *gv)
SSPUSHPTR(ohv = GvHVn(gv));
SSPUSHINT(SAVEt_HV);
- GvHV(gv) = Null(HV*);
+ GvHV(gv) = NULL;
hv = GvHVn(gv);
if (SvMAGIC(ohv))
mg_localize((SV*)ohv, (SV*)hv);
@@ -887,7 +887,7 @@ Perl_leave_scope(pTHX_ I32 base)
if (PL_comppad)
PL_curpad = AvARRAY(PL_comppad);
else
- PL_curpad = Null(SV**);
+ PL_curpad = NULL;
break;
case SAVEt_PADSV:
{
diff --git a/sv.c b/sv.c
index 4ba7b95bdb..30b84f088d 100644
--- a/sv.c
+++ b/sv.c
@@ -520,7 +520,7 @@ do_clean_all(pTHX_ SV *sv)
SvFLAGS(sv) |= SVf_BREAK;
if (PL_comppad == (AV*)sv) {
PL_comppad = NULL;
- PL_curpad = Null(SV**);
+ PL_curpad = NULL;
}
SvREFCNT_dec(sv);
}
@@ -6779,7 +6779,7 @@ Perl_vnewSVpvf(pTHX_ const char* pat, va_list* args)
dVAR;
register SV *sv;
new_SV(sv);
- sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
+ sv_vsetpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL);
return sv;
}
@@ -7784,7 +7784,7 @@ Usually used via its frontend C<sv_setpvf>.
void
Perl_sv_vsetpvf(pTHX_ SV *sv, const char* pat, va_list* args)
{
- sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
+ sv_vsetpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL);
}
/*
@@ -7817,7 +7817,7 @@ Usually used via its frontend C<sv_setpvf_mg>.
void
Perl_sv_vsetpvf_mg(pTHX_ SV *sv, const char* pat, va_list* args)
{
- sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
+ sv_vsetpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL);
SvSETMAGIC(sv);
}
@@ -7890,7 +7890,7 @@ Usually used via its frontend C<sv_catpvf>.
void
Perl_sv_vcatpvf(pTHX_ SV *sv, const char* pat, va_list* args)
{
- sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
+ sv_vcatpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL);
}
/*
@@ -7923,7 +7923,7 @@ Usually used via its frontend C<sv_catpvf_mg>.
void
Perl_sv_vcatpvf_mg(pTHX_ SV *sv, const char* pat, va_list* args)
{
- sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
+ sv_vcatpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL);
SvSETMAGIC(sv);
}
@@ -8131,7 +8131,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
const char *eptr = NULL;
STRLEN elen = 0;
SV *vecsv = NULL;
- const U8 *vecstr = Null(U8*);
+ const U8 *vecstr = NULL;
STRLEN veclen = 0;
char c = 0;
int i;
@@ -9536,7 +9536,7 @@ Perl_rvpv_dup(pTHX_ SV *dstr, const SV *sstr, CLONE_PARAMS* param)
}
}
else {
- /* Copy the Null */
+ /* Copy the NULL */
if (SvTYPE(dstr) == SVt_RV)
SvRV_set(dstr, NULL);
else
@@ -11068,7 +11068,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_localizing = proto_perl->Tlocalizing;
PL_errors = sv_dup_inc(proto_perl->Terrors, param);
- PL_hv_fetch_ent_mh = Nullhe;
+ PL_hv_fetch_ent_mh = NULL;
PL_modcount = proto_perl->Tmodcount;
PL_lastgotoprobe = NULL;
PL_dumpindent = proto_perl->Tdumpindent;
diff --git a/toke.c b/toke.c
index f11ed322cd..1981c75e41 100644
--- a/toke.c
+++ b/toke.c
@@ -820,7 +820,7 @@ S_skipspace(pTHX_ register char *s)
PerlIO_clearerr(PL_rsfp);
else
(void)PerlIO_close(PL_rsfp);
- PL_rsfp = Nullfp;
+ PL_rsfp = NULL;
return s;
}
@@ -2781,7 +2781,7 @@ Perl_yylex(pTHX)
PerlIO_clearerr(PL_rsfp);
else
(void)PerlIO_close(PL_rsfp);
- PL_rsfp = Nullfp;
+ PL_rsfp = NULL;
PL_doextract = FALSE;
}
if (!PL_in_eval && (PL_minus_n || PL_minus_p)) {
@@ -4610,7 +4610,7 @@ Perl_yylex(pTHX)
}
}
#endif
- PL_rsfp = Nullfp;
+ PL_rsfp = NULL;
}
goto fake_eof;
}
diff --git a/universal.c b/universal.c
index 2afa2f68a1..2eeddb612f 100644
--- a/universal.c
+++ b/universal.c
@@ -342,7 +342,7 @@ XS(XS_UNIVERSAL_VERSION)
pkg = gv_stashsv(ST(0), FALSE);
}
- gvp = pkg ? (GV**)hv_fetchs(pkg, "VERSION", FALSE) : Null(GV**);
+ gvp = pkg ? (GV**)hv_fetchs(pkg, "VERSION", FALSE) : NULL;
if (gvp && isGV(gv = *gvp) && (sv = GvSV(gv)) && SvOK(sv)) {
SV * const nsv = sv_newmortal();
diff --git a/util.c b/util.c
index 61d40365c1..50e0141b7d 100644
--- a/util.c
+++ b/util.c
@@ -1031,7 +1031,7 @@ char *
Perl_vform(pTHX_ const char *pat, va_list *args)
{
SV * const sv = mess_alloc();
- sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
+ sv_vsetpvfn(sv, pat, strlen(pat), args, NULL, 0, NULL);
return SvPVX(sv);
}
@@ -2123,7 +2123,7 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
taint_proper("Insecure %s%s", "EXEC");
}
if (PerlProc_pipe(p) < 0)
- return Nullfp;
+ return NULL;
/* Try for another pipe pair for error return */
if (PerlProc_pipe(pp) >= 0)
did_pipes = 1;
@@ -2135,7 +2135,7 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
PerlLIO_close(pp[0]);
PerlLIO_close(pp[1]);
}
- return Nullfp;
+ return NULL;
}
sleep(5);
}
@@ -2224,7 +2224,7 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
pid2 = wait4pid(pid, &status, 0);
} while (pid2 == -1 && errno == EINTR);
errno = errkid; /* Propagate errno from kid */
- return Nullfp;
+ return NULL;
}
}
if (did_pipes)
@@ -2263,7 +2263,7 @@ Perl_my_popen(pTHX_ const char *cmd, const char *mode)
taint_proper("Insecure %s%s", "EXEC");
}
if (PerlProc_pipe(p) < 0)
- return Nullfp;
+ return NULL;
if (doexec && PerlProc_pipe(pp) >= 0)
did_pipes = 1;
while ((pid = PerlProc_fork()) < 0) {
@@ -2276,7 +2276,7 @@ Perl_my_popen(pTHX_ const char *cmd, const char *mode)
}
if (!doexec)
Perl_croak(aTHX_ "Can't fork");
- return Nullfp;
+ return NULL;
}
sleep(5);
}
@@ -2332,7 +2332,7 @@ Perl_my_popen(pTHX_ const char *cmd, const char *mode)
#ifdef PERL_USES_PL_PIDSTATUS
hv_clear(PL_pidstatus); /* we have no children */
#endif
- return Nullfp;
+ return NULL;
#undef THIS
#undef THAT
}
@@ -2376,7 +2376,7 @@ Perl_my_popen(pTHX_ const char *cmd, const char *mode)
pid2 = wait4pid(pid, &status, 0);
} while (pid2 == -1 && errno == EINTR);
errno = errkid; /* Propagate errno from kid */
- return Nullfp;
+ return NULL;
}
}
if (did_pipes)
@@ -2782,7 +2782,7 @@ Perl_wait4pid(pTHX_ Pid_t pid, int *statusp, int flags)
goto finish;
#endif
#if !defined(HAS_WAITPID) && defined(HAS_WAIT4)
- result = wait4((pid==-1)?0:pid,statusp,flags,Null(struct rusage *));
+ result = wait4((pid==-1)?0:pid,statusp,flags,NULL);
goto finish;
#endif
#ifdef PERL_USES_PL_PIDSTATUS
@@ -3341,7 +3341,7 @@ Perl_get_vtbl(pTHX_ int vtbl_id)
result = &PL_vtbl_utf8;
break;
default:
- result = Null(MGVTBL*);
+ result = NULL;
break;
}
return (MGVTBL*)result;