diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-06-09 18:03:01 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-06-09 18:03:01 +0000 |
commit | cea2e8a9dd23747fd2b66edc86c58c64e9970321 (patch) | |
tree | 50e1ad203239e885681b4e804c46363e763ca432 /ext/Data/Dumper/Dumper.xs | |
parent | f019efd000a9017df645fb6c4cce1e7401ac9445 (diff) | |
download | perl-cea2e8a9dd23747fd2b66edc86c58c64e9970321.tar.gz |
more complete support for implicit thread/interpreter pointer,
enabled via -DPERL_IMPLICIT_CONTEXT (all changes are noops
without that enabled):
- USE_THREADS now enables PERL_IMPLICIT_CONTEXT, so dTHR
is a noop; tests pass on Solaris; should be faster now!
- MULTIPLICITY has been tested with and without
PERL_IMPLICIT_CONTEXT on Solaris
- improved function database now merged with embed.pl
- everything except the varargs functions have foo(a,b,c) macros
to provide compatibility
- varargs functions default to compatibility variants that
get the context pointer using dTHX
- there should be almost no source compatibility issues as a
result of all this
- dl_foo.xs changes other than dl_dlopen.xs untested
- still needs documentation, fixups for win32 etc
Next step: migrate most non-mutex variables from perlvars.h
to intrpvar.h
p4raw-id: //depot/perl@3524
Diffstat (limited to 'ext/Data/Dumper/Dumper.xs')
-rw-r--r-- | ext/Data/Dumper/Dumper.xs | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs index c1faea2a28..e0ca4035d3 100644 --- a/ext/Data/Dumper/Dumper.xs +++ b/ext/Data/Dumper/Dumper.xs @@ -21,8 +21,8 @@ static I32 num_q (char *s, STRLEN slen); static I32 esc_q (char *dest, char *src, STRLEN slen); -static SV *sv_x (SV *sv, char *str, STRLEN len, I32 n); -static I32 DD_dump (SV *val, char *name, STRLEN namelen, SV *retval, +static SV *sv_x (pTHX_ SV *sv, char *str, STRLEN len, I32 n); +static I32 DD_dump (pTHX_ SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, AV *postav, I32 *levelp, I32 indent, SV *pad, SV *xpad, SV *apad, SV *sep, SV *freezer, SV *toaster, @@ -95,7 +95,7 @@ esc_q(register char *d, register char *s, register STRLEN slen) /* append a repeated string to an SV */ static SV * -sv_x(SV *sv, register char *str, STRLEN len, I32 n) +sv_x(pTHX_ SV *sv, register char *str, STRLEN len, I32 n) { if (sv == Nullsv) sv = newSVpvn("", 0); @@ -126,7 +126,7 @@ sv_x(SV *sv, register char *str, STRLEN len, I32 n) * efficiency raisins.) Ugggh! */ static I32 -DD_dump(SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, +DD_dump(pTHX_ SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, AV *postav, I32 *levelp, I32 indent, SV *pad, SV *xpad, SV *apad, SV *sep, SV *freezer, SV *toaster, I32 purity, I32 deepcopy, I32 quotekeys, SV *bless) @@ -253,7 +253,7 @@ DD_dump(SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, } (*levelp)++; - ipad = sv_x(Nullsv, SvPVX(xpad), SvCUR(xpad), *levelp); + ipad = sv_x(aTHX_ Nullsv, SvPVX(xpad), SvCUR(xpad), *levelp); if (realpack) { /* we have a blessed ref */ STRLEN blesslen; @@ -263,7 +263,7 @@ DD_dump(SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, if (indent >= 2) { blesspad = apad; apad = newSVsv(apad); - sv_x(apad, " ", 1, blesslen+2); + sv_x(aTHX_ apad, " ", 1, blesslen+2); } } @@ -273,14 +273,14 @@ DD_dump(SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, sv_catpvn(namesv, "}", 1); if (realpack) { /* blessed */ sv_catpvn(retval, "do{\\(my $o = ", 13); - DD_dump(ival, SvPVX(namesv), SvCUR(namesv), retval, seenhv, + DD_dump(aTHX_ ival, SvPVX(namesv), SvCUR(namesv), retval, seenhv, postav, levelp, indent, pad, xpad, apad, sep, freezer, toaster, purity, deepcopy, quotekeys, bless); sv_catpvn(retval, ")}", 2); } /* plain */ else { sv_catpvn(retval, "\\", 1); - DD_dump(ival, SvPVX(namesv), SvCUR(namesv), retval, seenhv, + DD_dump(aTHX_ ival, SvPVX(namesv), SvCUR(namesv), retval, seenhv, postav, levelp, indent, pad, xpad, apad, sep, freezer, toaster, purity, deepcopy, quotekeys, bless); } @@ -291,7 +291,7 @@ DD_dump(SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, sv_catpvn(namesv, name, namelen); sv_catpvn(namesv, "}", 1); sv_catpvn(retval, "\\", 1); - DD_dump(ival, SvPVX(namesv), SvCUR(namesv), retval, seenhv, + DD_dump(aTHX_ ival, SvPVX(namesv), SvCUR(namesv), retval, seenhv, postav, levelp, indent, pad, xpad, apad, sep, freezer, toaster, purity, deepcopy, quotekeys, bless); SvREFCNT_dec(namesv); @@ -359,14 +359,14 @@ DD_dump(SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, } sv_catsv(retval, totpad); sv_catsv(retval, ipad); - DD_dump(elem, iname, ilen, retval, seenhv, postav, + DD_dump(aTHX_ elem, iname, ilen, retval, seenhv, postav, levelp, indent, pad, xpad, apad, sep, freezer, toaster, purity, deepcopy, quotekeys, bless); if (ix < ixmax) sv_catpvn(retval, ",", 1); } if (ixmax >= 0) { - SV *opad = sv_x(Nullsv, SvPVX(xpad), SvCUR(xpad), (*levelp)-1); + SV *opad = sv_x(aTHX_ Nullsv, SvPVX(xpad), SvCUR(xpad), (*levelp)-1); sv_catsv(retval, totpad); sv_catsv(retval, opad); SvREFCNT_dec(opad); @@ -465,7 +465,7 @@ DD_dump(SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, else newapad = apad; - DD_dump(hval, SvPVX(sname), SvCUR(sname), retval, seenhv, + DD_dump(aTHX_ hval, SvPVX(sname), SvCUR(sname), retval, seenhv, postav, levelp, indent, pad, xpad, newapad, sep, freezer, toaster, purity, deepcopy, quotekeys, bless); SvREFCNT_dec(sname); @@ -474,7 +474,7 @@ DD_dump(SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, SvREFCNT_dec(newapad); } if (i) { - SV *opad = sv_x(Nullsv, SvPVX(xpad), SvCUR(xpad), *levelp-1); + SV *opad = sv_x(aTHX_ Nullsv, SvPVX(xpad), SvCUR(xpad), *levelp-1); sv_catsv(retval, totpad); sv_catsv(retval, opad); SvREFCNT_dec(opad); @@ -602,9 +602,9 @@ DD_dump(SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, SvCUR(newapad) = 0; if (indent >= 2) - (void)sv_x(newapad, " ", 1, SvCUR(postentry)); + (void)sv_x(aTHX_ newapad, " ", 1, SvCUR(postentry)); - DD_dump(e, SvPVX(nname), SvCUR(nname), postentry, + DD_dump(aTHX_ e, SvPVX(nname), SvCUR(nname), postentry, seenhv, postav, &nlevel, indent, pad, xpad, newapad, sep, freezer, toaster, purity, deepcopy, quotekeys, bless); @@ -804,7 +804,7 @@ Data_Dumper_Dumpxs(href, ...) } if (indent >= 2) { - SV *tmpsv = sv_x(Nullsv, " ", 1, SvCUR(name)+3); + SV *tmpsv = sv_x(aTHX_ Nullsv, " ", 1, SvCUR(name)+3); newapad = newSVsv(apad); sv_catsv(newapad, tmpsv); SvREFCNT_dec(tmpsv); @@ -812,7 +812,7 @@ Data_Dumper_Dumpxs(href, ...) else newapad = apad; - DD_dump(val, SvPVX(name), SvCUR(name), valstr, seenhv, + DD_dump(aTHX_ val, SvPVX(name), SvCUR(name), valstr, seenhv, postav, &level, indent, pad, xpad, newapad, sep, freezer, toaster, purity, deepcopy, quotekeys, bless); |