develooper Front page | perl.perl5.changes | Postings from February 2006

Change 27238: More NullXXX macro removal from Andy Lester

From:
Rafael Garcia-Suarez
Date:
February 20, 2006 01:30
Subject:
Change 27238: More NullXXX macro removal from Andy Lester
Message ID:
200602200930.k1K9UAcB023016@smtp3.ActiveState.com
Change 27238 by rgs@marais on 2006/02/20 09:26:15

	More NullXXX macro removal from Andy Lester

Affected files ...

... //depot/perl/cop.h#106 edit
... //depot/perl/deb.c#49 edit
... //depot/perl/doio.c#321 edit
... //depot/perl/doop.c#178 edit
... //depot/perl/hv.c#289 edit
... //depot/perl/intrpvar.h#176 edit
... //depot/perl/mg.h#27 edit
... //depot/perl/pad.c#88 edit
... //depot/perl/pad.h#17 edit
... //depot/perl/perl.c#734 edit
... //depot/perl/pp_ctl.c#525 edit
... //depot/perl/pp_hot.c#452 edit
... //depot/perl/pp_sys.c#496 edit
... //depot/perl/scope.c#169 edit
... //depot/perl/sv.c#1149 edit
... //depot/perl/toke.c#647 edit
... //depot/perl/universal.c#137 edit
... //depot/perl/util.c#546 edit

Differences ...

==== //depot/perl/cop.h#106 (text) ====
Index: perl/cop.h
--- perl/cop.h#105~27136~	2006-02-09 08:49:32.000000000 -0800
+++ perl/cop.h	2006-02-20 01:26:15.000000000 -0800
@@ -542,7 +542,7 @@
 	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)

==== //depot/perl/deb.c#49 (text) ====
Index: perl/deb.c
--- perl/deb.c#48~27136~	2006-02-09 08:49:32.000000000 -0800
+++ perl/deb.c	2006-02-20 01:26:15.000000000 -0800
@@ -225,11 +225,9 @@
 		 */
 
 		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 @@
 
 		si_n = si;
 		i = ix;
-		cx_n = Null(PERL_CONTEXT*);
+		cx_n = NULL;
 		for (;;) {
 		    i++;
 		    if (i > si_n->si_cxix) {

==== //depot/perl/doio.c#321 (text) ====
Index: perl/doio.c
--- perl/doio.c#320~27129~	2006-02-07 19:23:27.000000000 -0800
+++ perl/doio.c	2006-02-20 01:26:15.000000000 -0800
@@ -65,8 +65,8 @@
 {
     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 @@
 			  "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 @@
 	    *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 @@
     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 @@
 	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 @@
 		    (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 @@
 		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 @@
 	    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 @@
 		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 @@
 {
     dVAR;
     Safefree(PL_Argv);
-    PL_Argv = Null(char **);
+    PL_Argv = NULL;
     Safefree(PL_Cmd);
     PL_Cmd = NULL;
 }
@@ -2439,7 +2439,7 @@
 #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;

==== //depot/perl/doop.c#178 (text) ====
Index: perl/doop.c
--- perl/doop.c#177~27065~	2006-02-03 08:03:01.000000000 -0800
+++ perl/doop.c	2006-02-20 01:26:15.000000000 -0800
@@ -722,7 +722,7 @@
     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);

==== //depot/perl/hv.c#289 (text) ====
Index: perl/hv.c
--- perl/hv.c#288~27215~	2006-02-17 16:11:07.000000000 -0800
+++ perl/hv.c	2006-02-20 01:26:15.000000000 -0800
@@ -124,7 +124,7 @@
 	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 @@
     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 @@
 		    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 @@
 		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 @@
     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 @@
 		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 @@
     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 @@
 	    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 @@
 	    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)) {

==== //depot/perl/intrpvar.h#176 (text) ====
Index: perl/intrpvar.h
--- perl/intrpvar.h#175~27084~	2006-02-04 11:09:17.000000000 -0800
+++ perl/intrpvar.h	2006-02-20 01:26:15.000000000 -0800
@@ -203,7 +203,7 @@
 
 /* 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 */

==== //depot/perl/mg.h#27 (text) ====
Index: perl/mg.h
--- perl/mg.h#26~26924~	2006-01-23 06:44:59.000000000 -0800
+++ perl/mg.h	2006-02-20 01:26:15.000000000 -0800
@@ -57,7 +57,6 @@
 				 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)))

==== //depot/perl/pad.c#88 (text) ====
Index: perl/pad.c
--- perl/pad.c#87~27177~	2006-02-14 02:00:36.000000000 -0800
+++ perl/pad.c	2006-02-20 01:26:15.000000000 -0800
@@ -307,7 +307,7 @@
 	SvREFCNT_dec(sv);
     }
     SvREFCNT_dec((SV*)CvPADLIST(cv));
-    CvPADLIST(cv) = Null(PADLIST*);
+    CvPADLIST(cv) = NULL;
 }
 
 
@@ -587,7 +587,7 @@
     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 @@
     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 @@
     /* 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 @@
 
 	PL_comppad_name = ocomppad_name;
 	PL_comppad = ocomppad;
-	PL_curpad = ocomppad ? AvARRAY(ocomppad) : Null(SV **);
+	PL_curpad = ocomppad ? AvARRAY(ocomppad) : NULL;
     }
     return new_offset;
 }

==== //depot/perl/pad.h#17 (text) ====
Index: perl/pad.h
--- perl/pad.h#16~27065~	2006-02-03 08:03:01.000000000 -0800
+++ perl/pad.h	2006-02-20 01:26:15.000000000 -0800
@@ -155,20 +155,20 @@
 
 
 #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 @@
 
 #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;	\

==== //depot/perl/perl.c#734 (text) ====
Index: perl/perl.c
--- perl/perl.c#733~27207~	2006-02-17 06:27:22.000000000 -0800
+++ perl/perl.c	2006-02-20 01:26:15.000000000 -0800
@@ -852,7 +852,7 @@
 
     if(PL_rsfp) {
 	(void)PerlIO_close(PL_rsfp);
-	PL_rsfp = Nullfp;
+	PL_rsfp = NULL;
     }
 
     /* Filters for program text */
@@ -4491,7 +4491,7 @@
     dVAR;
     PerlIO *tmpfp;
     tmpfp = PL_rsfp;
-    PL_rsfp = Nullfp;
+    PL_rsfp = NULL;
     lex_start(PL_linestr);
     PL_rsfp = tmpfp;
     PL_subname = newSVpvs("main");

==== //depot/perl/pp_ctl.c#525 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#524~27235~	2006-02-19 16:21:09.000000000 -0800
+++ perl/pp_ctl.c	2006-02-20 01:26:15.000000000 -0800
@@ -75,7 +75,7 @@
     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 @@
 	{
 	    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 @@
 	}
 #endif
 	Safefree(p);
-	*rsp = Null(void*);
+	*rsp = NULL;
     }
 }
 
@@ -3018,7 +3018,7 @@
     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 @@
 				    if (IoOFP(io) && IoOFP(io) != IoIFP(io)) {
 					PerlIO_close(IoOFP(io));
 				    }
-				    IoIFP(io) = Nullfp;
-				    IoOFP(io) = Nullfp;
+				    IoIFP(io) = NULL;
+				    IoOFP(io) = NULL;
 				}
 			    }
 

==== //depot/perl/pp_hot.c#452 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#451~27177~	2006-02-14 02:00:36.000000000 -0800
+++ perl/pp_hot.c	2006-02-20 01:26:15.000000000 -0800
@@ -1070,8 +1070,8 @@
 
     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 @@
 	    RETURN;
 	}
     }
-    fp = Nullfp;
+    fp = NULL;
     if (io) {
 	fp = IoIFP(io);
 	if (!fp) {
@@ -1564,7 +1564,7 @@
 		    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 @@
 	}
     }
 
-    SETs(method_common(sv, Null(U32*)));
+    SETs(method_common(sv, NULL));
     RETURN;
 }
 

==== //depot/perl/pp_sys.c#496 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c#495~27130~	2006-02-08 05:15:51.000000000 -0800
+++ perl/pp_sys.c	2006-02-20 01:26:15.000000000 -0800
@@ -564,7 +564,7 @@
     }
 
     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 @@
 	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 @@
     /* 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 @@
 		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 @@
     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 @@
     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 @@
 {
     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;
 }

==== //depot/perl/scope.c#169 (text) ====
Index: perl/scope.c
--- perl/scope.c#168~27184~	2006-02-14 15:42:45.000000000 -0800
+++ perl/scope.c	2006-02-20 01:26:15.000000000 -0800
@@ -296,7 +296,7 @@
     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 @@
     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 @@
 	    if (PL_comppad)
 		PL_curpad = AvARRAY(PL_comppad);
 	    else
-		PL_curpad = Null(SV**);
+		PL_curpad = NULL;
 	    break;
 	case SAVEt_PADSV:
 	    {

==== //depot/perl/sv.c#1149 (text) ====
Index: perl/sv.c
--- perl/sv.c#1148~27231~	2006-02-19 14:35:24.000000000 -0800
+++ perl/sv.c	2006-02-20 01:26:15.000000000 -0800
@@ -520,7 +520,7 @@
     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 @@
     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 @@
 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 @@
 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 @@
 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 @@
 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 @@
 	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 @@
 	}
     }
     else {
-	/* Copy the Null */
+	/* Copy the NULL */
 	if (SvTYPE(dstr) == SVt_RV)
 	    SvRV_set(dstr, NULL);
 	else
@@ -11068,7 +11068,7 @@
     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;

==== //depot/perl/toke.c#647 (text) ====
Index: perl/toke.c
--- perl/toke.c#646~27177~	2006-02-14 02:00:36.000000000 -0800
+++ perl/toke.c	2006-02-20 01:26:15.000000000 -0800
@@ -820,7 +820,7 @@
 		PerlIO_clearerr(PL_rsfp);
 	    else
 		(void)PerlIO_close(PL_rsfp);
-	    PL_rsfp = Nullfp;
+	    PL_rsfp = NULL;
 	    return s;
 	}
 
@@ -2781,7 +2781,7 @@
 			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 @@
 		    }
 		}
 #endif
-		PL_rsfp = Nullfp;
+		PL_rsfp = NULL;
 	    }
 	    goto fake_eof;
 	}

==== //depot/perl/universal.c#137 (text) ====
Index: perl/universal.c
--- perl/universal.c#136~27064~	2006-02-03 07:18:18.000000000 -0800
+++ perl/universal.c	2006-02-20 01:26:15.000000000 -0800
@@ -342,7 +342,7 @@
         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();

==== //depot/perl/util.c#546 (text) ====
Index: perl/util.c
--- perl/util.c#545~27151~	2006-02-10 06:25:33.000000000 -0800
+++ perl/util.c	2006-02-20 01:26:15.000000000 -0800
@@ -1031,7 +1031,7 @@
 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 @@
 	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 @@
 		PerlLIO_close(pp[0]);
 		PerlLIO_close(pp[1]);
 	    }
-	    return Nullfp;
+	    return NULL;
 	}
 	sleep(5);
     }
@@ -2224,7 +2224,7 @@
 		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 @@
 	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 @@
 	    }
 	    if (!doexec)
 		Perl_croak(aTHX_ "Can't fork");
-	    return Nullfp;
+	    return NULL;
 	}
 	sleep(5);
     }
@@ -2332,7 +2332,7 @@
 #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 @@
 		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 @@
     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 @@
 	result = &PL_vtbl_utf8;
 	break;
     default:
-	result = Null(MGVTBL*);
+	result = NULL;
 	break;
     }
     return (MGVTBL*)result;
End of Patch.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About