From: Nicholas Clark Date: Wed, 23 Jan 2008 09:51:35 +0000 (+0000) Subject: Purge all use of Nullch in non-dual life modules. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9849c14cd91dea2f36cd3d2a79984145cc69648c;p=p5sagit%2Fp5-mst-13.2.git Purge all use of Nullch in non-dual life modules. Exterminate! Exterminate! Exterminate! p4raw-id: //depot/perl@33052 --- diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs index d1e9401..434e3d9 100644 --- a/ext/Data/Dumper/Dumper.xs +++ b/ext/Data/Dumper/Dumper.xs @@ -322,7 +322,7 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv, if (SvOBJECT(ival)) realpack = HvNAME_get(SvSTASH(ival)); else - realpack = Nullch; + realpack = NULL; /* if it has a name, we need to either look it up, or keep a tab * on it so we know when we hit it later diff --git a/ext/Opcode/Opcode.xs b/ext/Opcode/Opcode.xs index eba1c86..4bcb2e4 100644 --- a/ext/Opcode/Opcode.xs +++ b/ext/Opcode/Opcode.xs @@ -145,7 +145,7 @@ new_opset(pTHX_ SV *old_opset) static int verify_opset(pTHX_ SV *opset, int fatal) { - const char *err = Nullch; + const char *err = NULL; dMY_CXT; if (!SvOK(opset)) err = "undefined"; diff --git a/ext/PerlIO/encoding/encoding.xs b/ext/PerlIO/encoding/encoding.xs index 617842f..f1b0742 100644 --- a/ext/PerlIO/encoding/encoding.xs +++ b/ext/PerlIO/encoding/encoding.xs @@ -257,9 +257,9 @@ PerlIOEncode_fill(pTHX_ PerlIO * f) STDCHAR *ptr = PerlIO_get_ptr(n); SSize_t use = (avail >= 0) ? avail : 0; SV *uni; - char *s = Nullch; + char *s = NULL; STRLEN len = 0; - e->base.ptr = e->base.end = (STDCHAR *) Nullch; + e->base.ptr = e->base.end = (STDCHAR *) NULL; (void) PerlIOEncode_get_base(aTHX_ f); if (!e->dataSV) e->dataSV = newSV(0); diff --git a/ext/PerlIO/scalar/scalar.xs b/ext/PerlIO/scalar/scalar.xs index b31e681..2c8eacd 100644 --- a/ext/PerlIO/scalar/scalar.xs +++ b/ext/PerlIO/scalar/scalar.xs @@ -184,7 +184,7 @@ PerlIOScalar_get_base(pTHX_ PerlIO * f) if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) { return (STDCHAR *) SvPV_nolen(s->var); } - return (STDCHAR *) Nullch; + return (STDCHAR *) NULL; } STDCHAR * @@ -194,7 +194,7 @@ PerlIOScalar_get_ptr(pTHX_ PerlIO * f) PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar); return PerlIOScalar_get_base(aTHX_ f) + s->posn; } - return (STDCHAR *) Nullch; + return (STDCHAR *) NULL; } SSize_t diff --git a/ext/PerlIO/via/via.xs b/ext/PerlIO/via/via.xs index b17108c..3bc3cbb 100644 --- a/ext/PerlIO/via/via.xs +++ b/ext/PerlIO/via/via.xs @@ -489,7 +489,7 @@ PerlIOVia_get_base(pTHX_ PerlIO * f) return (STDCHAR *) SvPVX(s->var); } } - return (STDCHAR *) Nullch; + return (STDCHAR *) NULL; } STDCHAR * @@ -502,7 +502,7 @@ PerlIOVia_get_ptr(pTHX_ PerlIO * f) return p; } } - return (STDCHAR *) Nullch; + return (STDCHAR *) NULL; } SSize_t diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs index bb68c1b..89e8b85 100644 --- a/ext/Storable/Storable.xs +++ b/ext/Storable/Storable.xs @@ -4450,7 +4450,7 @@ static SV *retrieve_hook(pTHX_ stcxt_t *cxt, const char *cname) * into the existing design. -- RAM, 17/02/2001 */ - sv_magic(sv, rv, mtype, Nullch, 0); + sv_magic(sv, rv, mtype, (char *)NULL, 0); SvREFCNT_dec(rv); /* Undo refcnt inc from sv_magic() */ return sv; @@ -4647,7 +4647,7 @@ static SV *retrieve_tied_array(pTHX_ stcxt_t *cxt, const char *cname) sv_upgrade(tv, SVt_PVAV); AvREAL_off((AV *)tv); - sv_magic(tv, sv, 'P', Nullch, 0); + sv_magic(tv, sv, 'P', (char *)NULL, 0); SvREFCNT_dec(sv); /* Undo refcnt inc from sv_magic() */ TRACEME(("ok (retrieve_tied_array at 0x%"UVxf")", PTR2UV(tv))); @@ -4675,7 +4675,7 @@ static SV *retrieve_tied_hash(pTHX_ stcxt_t *cxt, const char *cname) return (SV *) 0; /* Failed */ sv_upgrade(tv, SVt_PVHV); - sv_magic(tv, sv, 'P', Nullch, 0); + sv_magic(tv, sv, 'P', (char *)NULL, 0); SvREFCNT_dec(sv); /* Undo refcnt inc from sv_magic() */ TRACEME(("ok (retrieve_tied_hash at 0x%"UVxf")", PTR2UV(tv))); @@ -4707,7 +4707,7 @@ static SV *retrieve_tied_scalar(pTHX_ stcxt_t *cxt, const char *cname) } sv_upgrade(tv, SVt_PVMG); - sv_magic(tv, obj, 'q', Nullch, 0); + sv_magic(tv, obj, 'q', (char *)NULL, 0); if (obj) { /* Undo refcnt inc from sv_magic() */ @@ -4774,7 +4774,7 @@ static SV *retrieve_tied_idx(pTHX_ stcxt_t *cxt, const char *cname) RLEN(idx); /* Retrieve */ sv_upgrade(tv, SVt_PVMG); - sv_magic(tv, sv, 'p', Nullch, idx); + sv_magic(tv, sv, 'p', (char *)NULL, idx); SvREFCNT_dec(sv); /* Undo refcnt inc from sv_magic() */ return tv; diff --git a/malloc.c b/malloc.c index ce406d2..7c78913 100644 --- a/malloc.c +++ b/malloc.c @@ -379,9 +379,6 @@ # ifndef UVxf # define UVxf "lx" # endif -# ifndef Nullch -# define Nullch NULL -# endif # ifndef MEM_ALIGNBYTES # define MEM_ALIGNBYTES 4 # endif diff --git a/pod/perlapio.pod b/pod/perlapio.pod index 444fab3..1c57f9a 100644 --- a/pod/perlapio.pod +++ b/pod/perlapio.pod @@ -486,7 +486,7 @@ of passing NULL.) Portable cases are: - PerlIO_binmode(f,ptype,O_BINARY,Nullch); + PerlIO_binmode(f,ptype,O_BINARY,NULL); and PerlIO_binmode(f,ptype,O_TEXT,":crlf"); diff --git a/win32/vdir.h b/win32/vdir.h index a639ce5..db7ec84 100644 --- a/win32/vdir.h +++ b/win32/vdir.h @@ -316,7 +316,7 @@ inline void DoGetFullPathNameA(char* lpBuffer, DWORD dwSize, char* Dest) /* * On WinNT GetFullPathName does not fail, (or at least always - * succeeds when the drive is valid) WinNT does set *Dest to Nullch + * succeeds when the drive is valid) WinNT does set *Dest to NULL * On Win98 GetFullPathName will set last error if it fails, but * does not touch *Dest */ @@ -544,7 +544,7 @@ inline void DoGetFullPathNameW(WCHAR* lpBuffer, DWORD dwSize, WCHAR* Dest) /* * On WinNT GetFullPathName does not fail, (or at least always - * succeeds when the drive is valid) WinNT does set *Dest to Nullch + * succeeds when the drive is valid) WinNT does set *Dest to NULL * On Win98 GetFullPathName will set last error if it fails, but * does not touch *Dest */