diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-20 09:38:39 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-20 09:38:39 +0000 |
commit | 6b88bc9c1f6d4b32c70e7ef68f8c65266e431623 (patch) | |
tree | fe4f20be7c31cd96c8757067c3aefe35ea971694 /ext | |
parent | 045c1f128ac729dc76c4da7e8ffe34bf12692b94 (diff) | |
download | perl-6b88bc9c1f6d4b32c70e7ef68f8c65266e431623.tar.gz |
complete s/foo/PL_foo/ changes (all escaped cases identified with
brute force search script). Result builds and passes all tests on
Solaris. win32 and PERL_OBJECT are still untested.
p4raw-id: //depot/perl@1578
Diffstat (limited to 'ext')
-rw-r--r-- | ext/B/B.xs | 2 | ||||
-rw-r--r-- | ext/B/B/Asmdata.pm | 22 | ||||
-rw-r--r-- | ext/B/byteperl.c | 10 | ||||
-rw-r--r-- | ext/DB_File/DB_File.xs | 28 | ||||
-rw-r--r-- | ext/DB_File/typemap | 8 | ||||
-rw-r--r-- | ext/DynaLoader/dl_dld.xs | 4 | ||||
-rw-r--r-- | ext/DynaLoader/dl_next.xs | 2 | ||||
-rw-r--r-- | ext/DynaLoader/dl_vms.xs | 10 | ||||
-rw-r--r-- | ext/GDBM_File/typemap | 4 | ||||
-rw-r--r-- | ext/IO/IO.xs | 8 | ||||
-rw-r--r-- | ext/IPC/SysV/SysV.xs | 36 | ||||
-rw-r--r-- | ext/NDBM_File/typemap | 4 | ||||
-rw-r--r-- | ext/ODBM_File/ODBM_File.xs | 2 | ||||
-rw-r--r-- | ext/ODBM_File/typemap | 4 | ||||
-rw-r--r-- | ext/Opcode/Opcode.xs | 6 | ||||
-rw-r--r-- | ext/POSIX/POSIX.xs | 36 | ||||
-rw-r--r-- | ext/SDBM_File/typemap | 4 | ||||
-rw-r--r-- | ext/Thread/Thread.xs | 34 | ||||
-rw-r--r-- | ext/attrs/attrs.xs | 4 |
19 files changed, 87 insertions, 141 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs index 6bc421b2f7..8dbc915f92 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -267,7 +267,7 @@ static SV * cchar(SV *sv) { SV *sstr = newSVpv("'", 0); - char *s = SvPV(sv, na); + char *s = SvPV(sv, PL_na); if (*s == '\'') sv_catpv(sstr, "\\'"); diff --git a/ext/B/B/Asmdata.pm b/ext/B/B/Asmdata.pm index 340876b71b..247c5ae975 100644 --- a/ext/B/B/Asmdata.pm +++ b/ext/B/B/Asmdata.pm @@ -15,7 +15,7 @@ use Exporter; use vars qw(%insn_data @insn_name @optype @specialsv_name); @optype = qw(OP UNOP BINOP LOGOP CONDOP LISTOP PMOP SVOP GVOP PVOP LOOP COP); -@specialsv_name = qw(Nullsv &sv_undef &sv_yes &sv_no); +@specialsv_name = qw(Nullsv &PL_sv_undef &PL_sv_yes &PL_sv_no); # XXX insn_data is initialised this way because with a large # %insn_data = (foo => [...], bar => [...], ...) initialiser @@ -148,23 +148,3 @@ while (($insn_name, $insn_data) = each %insn_data) { @insn_name = map($_ || "unused", @insn_name); 1; - -__END__ - -=head1 NAME - -B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode - -=head1 SYNOPSIS - - use Asmdata; - -=head1 DESCRIPTION - -See F<ext/B/B/Asmdata.pm>. - -=head1 AUTHOR - -Malcolm Beattie, C<mbeattie@sable.ox.ac.uk> - -=cut diff --git a/ext/B/byteperl.c b/ext/B/byteperl.c index 323d63a809..6b53e3b174 100644 --- a/ext/B/byteperl.c +++ b/ext/B/byteperl.c @@ -34,7 +34,7 @@ main(int argc, char **argv, char **env) perl_init_i18nl14n(1); #endif - if (!do_undump) { + if (!PL_do_undump) { my_perl = perl_alloc(); if (!my_perl) #ifdef VMS @@ -46,8 +46,8 @@ main(int argc, char **argv, char **env) } #ifdef CSH - if (!cshlen) - cshlen = strlen(cshname); + if (!PL_cshlen) + PL_cshlen = strlen(PL_cshname); #endif if (argc < 2) @@ -83,8 +83,8 @@ main(int argc, char **argv, char **env) exit( exitstatus ); sv_setpv(GvSV(gv_fetchpv("0", TRUE, SVt_PV)), argv[0]); - main_cv = compcv; - compcv = 0; + PL_main_cv = PL_compcv; + PL_compcv = 0; #ifdef INDIRECT_BGET_MACROS bs.data = fp; diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs index 237f2e4e7a..c661023a33 100644 --- a/ext/DB_File/DB_File.xs +++ b/ext/DB_File/DB_File.xs @@ -718,11 +718,11 @@ SV * sv ; #endif svp = hv_fetch(action, "bfname", 6, FALSE); if (svp && SvOK(*svp)) { - char * ptr = SvPV(*svp,na) ; + char * ptr = SvPV(*svp,PL_na) ; #ifdef DB_VERSION_MAJOR - name = (char*) na ? ptr : NULL ; + name = (char*) PL_na ? ptr : NULL ; #else - info->db_RE_bfname = (char*) (na ? ptr : NULL) ; + info->db_RE_bfname = (char*) (PL_na ? ptr : NULL) ; #endif } else @@ -738,7 +738,7 @@ SV * sv ; { int value ; if (SvPOK(*svp)) - value = (int)*SvPV(*svp, na) ; + value = (int)*SvPV(*svp, PL_na) ; else value = SvIV(*svp) ; @@ -756,7 +756,7 @@ SV * sv ; if (svp && SvOK(*svp)) { if (SvPOK(*svp)) - info->db_RE_bval = (u_char)*SvPV(*svp, na) ; + info->db_RE_bval = (u_char)*SvPV(*svp, PL_na) ; else info->db_RE_bval = (u_char)(unsigned long) SvIV(*svp) ; DB_flags(info->flags, DB_DELIMITER) ; @@ -1102,7 +1102,7 @@ db_DoTie_(isHASH, dbtype, name=undef, flags=O_CREAT|O_RDWR, mode=0666, type=DB_H SV * sv = (SV *) NULL ; if (items >= 3 && SvOK(ST(2))) - name = (char*) SvPV(ST(2), na) ; + name = (char*) SvPV(ST(2), PL_na) ; if (items == 6) sv = ST(5) ; @@ -1245,8 +1245,8 @@ unshift(db, ...) #endif for (i = items-1 ; i > 0 ; --i) { - value.data = SvPV(ST(i), na) ; - value.size = na ; + value.data = SvPV(ST(i), PL_na) ; + value.size = PL_na ; One = 1 ; key.data = &One ; key.size = sizeof(int) ; @@ -1286,7 +1286,7 @@ pop(db) OutputValue(ST(0), value) ; RETVAL = db_del(db, key, R_CURSOR) ; if (RETVAL != 0) - sv_setsv(ST(0), &sv_undef); + sv_setsv(ST(0), &PL_sv_undef); } } @@ -1313,7 +1313,7 @@ shift(db) OutputValue(ST(0), value) ; RETVAL = db_del(db, key, R_CURSOR) ; if (RETVAL != 0) - sv_setsv (ST(0), &sv_undef) ; + sv_setsv (ST(0), &PL_sv_undef) ; } } @@ -1344,8 +1344,8 @@ push(db, ...) { ++ (* (int*)key.data) ; - value.data = SvPV(ST(i), na) ; - value.size = na ; + value.data = SvPV(ST(i), PL_na) ; + value.size = PL_na ; RETVAL = (Db->put)(Db, NULL, &key, &value, 0) ; if (RETVAL != 0) break; @@ -1353,8 +1353,8 @@ push(db, ...) #else for (i = items - 1 ; i > 0 ; --i) { - value.data = SvPV(ST(i), na) ; - value.size = na ; + value.data = SvPV(ST(i), PL_na) ; + value.size = PL_na ; RETVAL = (Db->put)(Db, keyptr, &value, R_IAFTER) ; if (RETVAL != 0) break; diff --git a/ext/DB_File/typemap b/ext/DB_File/typemap index 42c49d7dd1..7af55aec21 100644 --- a/ext/DB_File/typemap +++ b/ext/DB_File/typemap @@ -16,8 +16,8 @@ DBTKEY T_dbtkeydatum INPUT T_dbtkeydatum if (db->type != DB_RECNO) { - $var.data = SvPV($arg, na); - $var.size = (int)na; + $var.data = SvPV($arg, PL_na); + $var.size = (int)PL_na; DBT_flags($var); } else { @@ -27,8 +27,8 @@ T_dbtkeydatum DBT_flags($var); } T_dbtdatum - $var.data = SvPV($arg, na); - $var.size = (int)na; + $var.data = SvPV($arg, PL_na); + $var.size = (int)PL_na; DBT_flags($var); OUTPUT diff --git a/ext/DynaLoader/dl_dld.xs b/ext/DynaLoader/dl_dld.xs index a0bdcc8de1..2443ab0d69 100644 --- a/ext/DynaLoader/dl_dld.xs +++ b/ext/DynaLoader/dl_dld.xs @@ -58,10 +58,10 @@ dl_private_init() dlderr = dld_init("/proc/self/exe"); if (dlderr) { #endif - dlderr = dld_init(dld_find_executable(origargv[0])); + dlderr = dld_init(dld_find_executable(PL_origargv[0])); if (dlderr) { char *msg = dld_strerror(dlderr); - SaveError("dld_init(%s) failed: %s", origargv[0], msg); + SaveError("dld_init(%s) failed: %s", PL_origargv[0], msg); DLDEBUG(1,PerlIO_printf(PerlIO_stderr(), "%s", LastError)); } #ifdef __linux__ diff --git a/ext/DynaLoader/dl_next.xs b/ext/DynaLoader/dl_next.xs index 48ec49cd82..2b547f0f00 100644 --- a/ext/DynaLoader/dl_next.xs +++ b/ext/DynaLoader/dl_next.xs @@ -182,7 +182,7 @@ static char *dlopen(char *path, int mode /* mode is ignored */) p = (char **) safemalloc(psize * sizeof(char*)); p[0] = path; for(i=1; i<psize-1; i++) { - p[i] = SvPVx(*av_fetch(dl_resolve_using, i-1, TRUE), na); + p[i] = SvPVx(*av_fetch(dl_resolve_using, i-1, TRUE), PL_na); } p[psize-1] = 0; rld_success = rld_load(nxerr, (struct mach_header **)0, p, diff --git a/ext/DynaLoader/dl_vms.xs b/ext/DynaLoader/dl_vms.xs index 2ed718dfd7..974fd58b52 100644 --- a/ext/DynaLoader/dl_vms.xs +++ b/ext/DynaLoader/dl_vms.xs @@ -184,7 +184,7 @@ dl_expandspec(filespec) DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), "\tSYNCHK sys$parse = %d\n",sts)); if (!(sts & 1)) { dl_set_error(dlfab.fab$l_sts,dlfab.fab$l_stv); - ST(0) = &sv_undef; + ST(0) = &PL_sv_undef; } else { /* Now set up a default spec - everything but the name */ @@ -205,7 +205,7 @@ dl_expandspec(filespec) DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), "\tname/default sys$parse = %d\n",sts)); if (!(sts & 1)) { dl_set_error(dlfab.fab$l_sts,dlfab.fab$l_stv); - ST(0) = &sv_undef; + ST(0) = &PL_sv_undef; } else { /* Now find the actual file */ @@ -213,7 +213,7 @@ dl_expandspec(filespec) DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), "\tsys$search = %d\n",sts)); if (!(sts & 1)) { dl_set_error(dlfab.fab$l_sts,dlfab.fab$l_stv); - ST(0) = &sv_undef; + ST(0) = &PL_sv_undef; } else { ST(0) = sv_2mortal(newSVpv(dlnam.nam$l_rsa,dlnam.nam$b_rsl)); @@ -295,7 +295,7 @@ dl_load_file(filespec, flags) Safefree(dlptr->name.dsc$a_pointer); Safefree(dlptr->defspec.dsc$a_pointer); Safefree(dlptr); - ST(0) = &sv_undef; + ST(0) = &PL_sv_undef; } else { ST(0) = sv_2mortal(newSViv((IV) dlptr)); @@ -323,7 +323,7 @@ dl_find_symbol(librefptr,symname) (unsigned long int) entry)); if (!(sts & 1)) { /* error message already saved by findsym_handler */ - ST(0) = &sv_undef; + ST(0) = &PL_sv_undef; } else ST(0) = sv_2mortal(newSViv((IV) entry)); diff --git a/ext/GDBM_File/typemap b/ext/GDBM_File/typemap index a9b73d8b81..317a8f3886 100644 --- a/ext/GDBM_File/typemap +++ b/ext/GDBM_File/typemap @@ -14,8 +14,8 @@ FATALFUNC T_OPAQUEPTR INPUT T_DATUM - $var.dptr = SvPV($arg, na); - $var.dsize = (int)na; + $var.dptr = SvPV($arg, PL_na); + $var.dsize = (int)PL_na; T_GDATUM UNIMPLEMENTED OUTPUT diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs index f226a79a9f..afe7f7775b 100644 --- a/ext/IO/IO.xs +++ b/ext/IO/IO.xs @@ -94,7 +94,7 @@ fgetpos(handle) ST(0) = sv_2mortal(newSVpv((char*)&pos, sizeof(Fpos_t))); } else { - ST(0) = &sv_undef; + ST(0) = &PL_sv_undef; errno = EINVAL; } @@ -104,7 +104,7 @@ fsetpos(handle, pos) SV * pos CODE: char *p; - if (handle && (p = SvPVx(pos, na)) && na == sizeof(Fpos_t)) + if (handle && (p = SvPVx(pos, PL_na)) && PL_na == sizeof(Fpos_t)) #ifdef PerlIO RETVAL = PerlIO_setpos(handle, (Fpos_t*)p); #else @@ -139,7 +139,7 @@ new_tmpfile(packname = "IO::File") SvREFCNT_dec(gv); /* undo increment in newRV() */ } else { - ST(0) = &sv_undef; + ST(0) = &PL_sv_undef; SvREFCNT_dec(gv); } @@ -153,7 +153,7 @@ constant(name) if (constant(name, &i)) ST(0) = sv_2mortal(newSViv(i)); else - ST(0) = &sv_undef; + ST(0) = &PL_sv_undef; int ungetc(handle, c) diff --git a/ext/IPC/SysV/SysV.xs b/ext/IPC/SysV/SysV.xs index b97e9e5893..3503ad92b1 100644 --- a/ext/IPC/SysV/SysV.xs +++ b/ext/IPC/SysV/SysV.xs @@ -32,40 +32,6 @@ # include <vm/vm_param.h> #endif -#ifndef newCONSTSUB -static void -newCONSTSUB(stash,name,sv) - HV *stash; - char *name; - SV *sv; -{ -#ifdef dTHR - dTHR; -#endif - U32 oldhints = hints; - HV *old_cop_stash = curcop->cop_stash; - HV *old_curstash = curstash; - line_t oldline = curcop->cop_line; - curcop->cop_line = copline; - - hints &= ~HINT_BLOCK_SCOPE; - if(stash) - curstash = curcop->cop_stash = stash; - - newSUB( - start_subparse(FALSE, 0), - newSVOP(OP_CONST, 0, newSVpv(name,0)), - newSVOP(OP_CONST, 0, &sv_no), /* SvPV(&sv_no) == "" -- GMB */ - newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv)) - ); - - hints = oldhints; - curcop->cop_stash = old_cop_stash; - curstash = old_curstash; - curcop->cop_line = oldline; -} -#endif - MODULE=IPC::SysV PACKAGE=IPC::Msg::stat PROTOTYPES: ENABLE @@ -199,7 +165,7 @@ ftok(path, id) CODE: #if defined(HAS_SEM) || defined(HAS_SHM) key_t k = ftok(path, id); - ST(0) = k == (key_t) -1 ? &sv_undef : sv_2mortal(newSViv(k)); + ST(0) = k == (key_t) -1 ? &PL_sv_undef : sv_2mortal(newSViv(k)); #else DIE(no_func, "ftok"); #endif diff --git a/ext/NDBM_File/typemap b/ext/NDBM_File/typemap index a9b73d8b81..317a8f3886 100644 --- a/ext/NDBM_File/typemap +++ b/ext/NDBM_File/typemap @@ -14,8 +14,8 @@ FATALFUNC T_OPAQUEPTR INPUT T_DATUM - $var.dptr = SvPV($arg, na); - $var.dsize = (int)na; + $var.dptr = SvPV($arg, PL_na); + $var.dsize = (int)PL_na; T_GDATUM UNIMPLEMENTED OUTPUT diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs index 5127ea52a3..892c038a9c 100644 --- a/ext/ODBM_File/ODBM_File.xs +++ b/ext/ODBM_File/ODBM_File.xs @@ -76,7 +76,7 @@ odbm_TIEHASH(dbtype, filename, flags, mode) croak("ODBM_FILE: Can't open %s", filename); } RETVAL = (void*)(dbminit(filename) >= 0 ? &dbmrefcnt : 0); - ST(0) = sv_mortalcopy(&sv_undef); + ST(0) = sv_mortalcopy(&PL_sv_undef); sv_setptrobj(ST(0), RETVAL, dbtype); } diff --git a/ext/ODBM_File/typemap b/ext/ODBM_File/typemap index a6b0e5faa8..5e12e73933 100644 --- a/ext/ODBM_File/typemap +++ b/ext/ODBM_File/typemap @@ -14,8 +14,8 @@ FATALFUNC T_OPAQUEPTR INPUT T_DATUM - $var.dptr = SvPV($arg, na); - $var.dsize = (int)na; + $var.dptr = SvPV($arg, PL_na); + $var.dsize = (int)PL_na; T_GDATUM UNIMPLEMENTED OUTPUT diff --git a/ext/Opcode/Opcode.xs b/ext/Opcode/Opcode.xs index 63743a5ce0..1da7794577 100644 --- a/ext/Opcode/Opcode.xs +++ b/ext/Opcode/Opcode.xs @@ -375,7 +375,7 @@ CODE: } set_opset_bits(bitmap, bitspec, on, opname); } - ST(0) = &sv_yes; + ST(0) = &PL_sv_yes; @@ -400,7 +400,7 @@ PPCODE: } else if (SvPOK(bitspec) && SvCUR(bitspec) == opset_len) { int b, j; - char *bitmap = SvPV(bitspec,na); + char *bitmap = SvPV(bitspec,PL_na); myopcode = 0; for (b=0; b < opset_len; b++) { U16 bits = bitmap[b]; @@ -423,7 +423,7 @@ CODE: STRLEN len; char *optag = SvPV(optagsv, len); put_op_bitspec(optag, len, mask); /* croaks */ - ST(0) = &sv_yes; + ST(0) = &PL_sv_yes; void diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 0a5212d0b3..b86fbdce1a 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -78,7 +78,7 @@ /* The non-POSIX CRTL times() has void return type, so we just get the current time directly */ - clock_t vms_times(struct tms *bufptr) { + clock_t vms_times(struct tms *PL_bufptr) { clock_t retval; /* Get wall time and convert to 10 ms intervals to * produce the return value that the POSIX standard expects */ @@ -98,7 +98,7 @@ _ckvmssts(lib$ediv(&divisor,vmstime,(long int *)&retval,&remainder)); # endif /* Fill in the struct tms using the CRTL routine . . .*/ - times((tbuffer_t *)bufptr); + times((tbuffer_t *)PL_bufptr); return (clock_t) retval; } # define times(t) vms_times(t) @@ -2807,7 +2807,7 @@ isalnum(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + na; /* "na" set by typemap side effect */ + unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ for (RETVAL = 1; RETVAL && s < e; s++) if (!isalnum(*s)) RETVAL = 0; @@ -2819,7 +2819,7 @@ isalpha(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + na; /* "na" set by typemap side effect */ + unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ for (RETVAL = 1; RETVAL && s < e; s++) if (!isalpha(*s)) RETVAL = 0; @@ -2831,7 +2831,7 @@ iscntrl(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + na; /* "na" set by typemap side effect */ + unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ for (RETVAL = 1; RETVAL && s < e; s++) if (!iscntrl(*s)) RETVAL = 0; @@ -2843,7 +2843,7 @@ isdigit(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + na; /* "na" set by typemap side effect */ + unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ for (RETVAL = 1; RETVAL && s < e; s++) if (!isdigit(*s)) RETVAL = 0; @@ -2855,7 +2855,7 @@ isgraph(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + na; /* "na" set by typemap side effect */ + unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ for (RETVAL = 1; RETVAL && s < e; s++) if (!isgraph(*s)) RETVAL = 0; @@ -2867,7 +2867,7 @@ islower(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + na; /* "na" set by typemap side effect */ + unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ for (RETVAL = 1; RETVAL && s < e; s++) if (!islower(*s)) RETVAL = 0; @@ -2879,7 +2879,7 @@ isprint(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + na; /* "na" set by typemap side effect */ + unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ for (RETVAL = 1; RETVAL && s < e; s++) if (!isprint(*s)) RETVAL = 0; @@ -2891,7 +2891,7 @@ ispunct(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + na; /* "na" set by typemap side effect */ + unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ for (RETVAL = 1; RETVAL && s < e; s++) if (!ispunct(*s)) RETVAL = 0; @@ -2903,7 +2903,7 @@ isspace(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + na; /* "na" set by typemap side effect */ + unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ for (RETVAL = 1; RETVAL && s < e; s++) if (!isspace(*s)) RETVAL = 0; @@ -2915,7 +2915,7 @@ isupper(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + na; /* "na" set by typemap side effect */ + unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ for (RETVAL = 1; RETVAL && s < e; s++) if (!isupper(*s)) RETVAL = 0; @@ -2927,7 +2927,7 @@ isxdigit(charstring) unsigned char * charstring CODE: unsigned char *s = charstring; - unsigned char *e = s + na; /* "na" set by typemap side effect */ + unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */ for (RETVAL = 1; RETVAL && s < e; s++) if (!isxdigit(*s)) RETVAL = 0; @@ -3182,7 +3182,7 @@ sigaction(sig, action, oldaction = 0) /* Remember old handler name if desired. */ if (oldaction) { - char *hand = SvPVx(*sigsvp, na); + char *hand = SvPVx(*sigsvp, PL_na); svp = hv_fetch(oldaction, "HANDLER", 7, TRUE); sv_setpv(*svp, *hand ? hand : "DEFAULT"); } @@ -3193,7 +3193,7 @@ sigaction(sig, action, oldaction = 0) svp = hv_fetch(action, "HANDLER", 7, FALSE); if (!svp) croak("Can't supply an action without a HANDLER"); - sv_setpv(*sigsvp, SvPV(*svp, na)); + sv_setpv(*sigsvp, SvPV(*svp, PL_na)); mg_set(*sigsvp); /* handles DEFAULT and IGNORE */ act.sa_handler = sighandler; @@ -3408,7 +3408,7 @@ strtod(str) if (unparsed) PUSHs(sv_2mortal(newSViv(strlen(unparsed)))); else - PUSHs(&sv_undef); + PUSHs(&PL_sv_undef); } void @@ -3429,7 +3429,7 @@ strtol(str, base = 0) if (unparsed) PUSHs(sv_2mortal(newSViv(strlen(unparsed)))); else - PUSHs(&sv_undef); + PUSHs(&PL_sv_undef); } void @@ -3450,7 +3450,7 @@ strtoul(str, base = 0) if (unparsed) PUSHs(sv_2mortal(newSViv(strlen(unparsed)))); else - PUSHs(&sv_undef); + PUSHs(&PL_sv_undef); } SV * diff --git a/ext/SDBM_File/typemap b/ext/SDBM_File/typemap index a9b73d8b81..317a8f3886 100644 --- a/ext/SDBM_File/typemap +++ b/ext/SDBM_File/typemap @@ -14,8 +14,8 @@ FATALFUNC T_OPAQUEPTR INPUT T_DATUM - $var.dptr = SvPV($arg, na); - $var.dsize = (int)na; + $var.dptr = SvPV($arg, PL_na); + $var.dsize = (int)PL_na; T_GDATUM UNIMPLEMENTED OUTPUT diff --git a/ext/Thread/Thread.xs b/ext/Thread/Thread.xs index 20a16e9247..9bf52855ef 100644 --- a/ext/Thread/Thread.xs +++ b/ext/Thread/Thread.xs @@ -43,7 +43,7 @@ threadstart(void *arg) Thread savethread = thr; LOGOP myop; dSP; - I32 oldscope = scopestack_ix; + I32 oldscope = PL_scopestack_ix; I32 retval; AV *av; int i; @@ -60,14 +60,14 @@ threadstart(void *arg) thr->private = 0; /* Now duplicate most of perl_call_sv but with a few twists */ - op = (OP*)&myop; - Zero(op, 1, LOGOP); + PL_op = (OP*)&myop; + Zero(PL_op, 1, LOGOP); myop.op_flags = OPf_STACKED; myop.op_next = Nullop; myop.op_flags |= OPf_KNOW; myop.op_flags |= OPf_WANT_LIST; - op = pp_entersub(ARGS); - DEBUG_L(if (!op) + PL_op = pp_entersub(ARGS); + DEBUG_L(if (!PL_op) PerlIO_printf(PerlIO_stderr(), "thread starts at Nullop\n")); /* * When this thread is next scheduled, we start in the right @@ -123,10 +123,10 @@ threadstart(void *arg) MUTEX_LOCK(&thr->mutex); thr->flags |= THRf_DID_DIE; MUTEX_UNLOCK(&thr->mutex); - av_store(av, 0, &sv_no); + av_store(av, 0, &PL_sv_no); av_store(av, 1, newSVsv(thr->errsv)); DEBUG_L(PerlIO_printf(PerlIO_stderr(), "%p died: %s\n", - thr, SvPV(thr->errsv, na))); + thr, SvPV(thr->errsv, PL_na))); } else { DEBUG_L(STMT_START { for (i = 1; i <= retval; i++) { @@ -134,7 +134,7 @@ threadstart(void *arg) thr, i, SvPEEK(SP[i - 1])); } } STMT_END); - av_store(av, 0, &sv_yes); + av_store(av, 0, &PL_sv_yes); for (i = 1; i <= retval; i++, SP++) sv_setsv(*av_fetch(av, i, TRUE), SvREFCNT_inc(*SP)); } @@ -142,7 +142,7 @@ threadstart(void *arg) finishoff: #if 0 /* removed for debug */ - SvREFCNT_dec(curstack); + SvREFCNT_dec(PL_curstack); #endif SvREFCNT_dec(thr->cvcache); SvREFCNT_dec(thr->threadsv); @@ -174,7 +174,7 @@ threadstart(void *arg) Safefree(PL_screamnext); Safefree(PL_reg_start_tmp); SvREFCNT_dec(PL_lastscream); - /*SvREFCNT_dec(defoutgv);*/ + /*SvREFCNT_dec(PL_defoutgv);*/ MUTEX_LOCK(&thr->mutex); DEBUG_L(PerlIO_printf(PerlIO_stderr(), @@ -290,7 +290,7 @@ newthread (SV *startsv, AV *initargs, char *classname) return sv_bless(newRV_noinc(sv), gv_stashpv(classname, TRUE)); #else croak("No threads in this perl"); - return &sv_undef; + return &PL_sv_undef; #endif } @@ -354,7 +354,7 @@ join(t) for (i = 1; i <= AvFILL(av); i++) XPUSHs(sv_2mortal(*av_fetch(av, i, FALSE))); } else { - char *mess = SvPV(*av_fetch(av, 1, FALSE), na); + char *mess = SvPV(*av_fetch(av, 1, FALSE), PL_na); DEBUG_L(PerlIO_printf(PerlIO_stderr(), "%p: join propagating die message: %s\n", thr, mess)); @@ -396,7 +396,7 @@ equal(t1, t2) Thread t1 Thread t2 PPCODE: - PUSHs((t1 == t2) ? &sv_yes : &sv_no); + PUSHs((t1 == t2) ? &PL_sv_yes : &PL_sv_no); void flags(t) @@ -438,7 +438,7 @@ void DESTROY(t) SV * t PPCODE: - PUSHs(&sv_yes); + PUSHs(&PL_sv_yes); void yield() @@ -582,7 +582,7 @@ void kill_sighandler_thread() PPCODE: write(sig_pipe[1], "\0", 1); - PUSHs(&sv_yes); + PUSHs(&PL_sv_yes); void init_thread_signals() @@ -590,7 +590,7 @@ init_thread_signals() PL_sighandlerp = handle_thread_signal; if (pipe(sig_pipe) == -1) XSRETURN_UNDEF; - PUSHs(&sv_yes); + PUSHs(&PL_sv_yes); void await_signal() @@ -605,7 +605,7 @@ await_signal() croak("panic: await_signal"); ST(0) = sv_newmortal(); if (ret) - sv_setsv(ST(0), c ? psig_ptr[c] : &sv_no); + sv_setsv(ST(0), c ? psig_ptr[c] : &PL_sv_no); DEBUG_L(PerlIO_printf(PerlIO_stderr(), "await_signal returning %s\n", SvPEEK(ST(0)));); diff --git a/ext/attrs/attrs.xs b/ext/attrs/attrs.xs index bc0df7082b..da952d5a3f 100644 --- a/ext/attrs/attrs.xs +++ b/ext/attrs/attrs.xs @@ -27,7 +27,7 @@ char * Class if (!PL_compcv || !(cv = CvOUTSIDE(PL_compcv))) croak("can't set attributes outside a subroutine scope"); for (i = 1; i < items; i++) { - char *attr = SvPV(ST(i), na); + char *attr = SvPV(ST(i), PL_na); cv_flags_t flag = get_flag(attr); if (!flag) croak("invalid attribute name %s", attr); @@ -47,7 +47,7 @@ SV * sub sub = Nullsv; } else { - char *name = SvPV(sub, na); + char *name = SvPV(sub, PL_na); sub = (SV*)perl_get_cv(name, FALSE); } if (!sub) |