X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pad.c;h=8b5f86a03ed0dc5d3b5fafb46527883c1ec6ec93;hb=b0bc38e63ed7e7e448fb07e45ee093d3b3d54be8;hp=f2c77771d86025f967d320b3033907fe62415632;hpb=01773faa9769567ce88d77c5c19bfde6b32b5488;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pad.c b/pad.c index f2c7777..8b5f86a 100644 --- a/pad.c +++ b/pad.c @@ -1,6 +1,6 @@ /* pad.c * - * Copyright (C) 2002,2003 by Larry Wall and others + * Copyright (C) 2002, 2003, 2004, by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -582,6 +582,19 @@ Perl_pad_findmy(pTHX_ char *name) return NOT_IN_PAD; } +/* + * Returns the offset of a lexical $_, if there is one, at run time. + * Used by the UNDERBAR XS macro. + */ + +PADOFFSET +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); +} /* =for apidoc pad_findlex @@ -1260,7 +1273,7 @@ Perl_do_dump_pad(pTHX_ I32 level, PerlIO *file, PADLIST *padlist, int full) if (namesv) { if (SvFAKE(namesv)) Perl_dump_indent(aTHX_ level+1, file, - "%2d. 0x%"UVxf"<%lu> FAKE \"%s\" flags=0x%x index=%lu\n", + "%2d. 0x%"UVxf"<%lu> FAKE \"%s\" flags=0x%lx index=%lu\n", (int) ix, PTR2UV(ppad[ix]), (unsigned long) (ppad[ix] ? SvREFCNT(ppad[ix]) : 0), @@ -1523,6 +1536,9 @@ If has_args is true, give the new pad an @_ in slot zero. =cut */ +/* XXX pad_push is now always called with has_args == 1. Get rid of + * this arg at some point */ + void Perl_pad_push(pTHX_ PADLIST *padlist, int depth, int has_args) {