X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=indirect.xs;h=284217ca0c139a31d89c0f27fb808647441c89de;hp=9e8dc99bdb995fd2979471cf13dadbb945cb04ab;hb=03e565adcd2c23d08331a676767a8195f61a3cf4;hpb=b2f0fe94a79e6c4426f2b566bd06e5acf9f42c02 diff --git a/indirect.xs b/indirect.xs index 9e8dc99..284217c 100644 --- a/indirect.xs +++ b/indirect.xs @@ -146,6 +146,9 @@ static SV *indirect_hint(pTHX) { # ifndef PL_lex_inwhat # define PL_lex_inwhat PL_parser->lex_inwhat # endif +# ifndef PL_multi_close +# define PL_multi_close PL_parser->multi_close +# endif #else # ifndef PL_linestr # define PL_linestr PL_Ilinestr @@ -159,6 +162,9 @@ static SV *indirect_hint(pTHX) { # ifndef PL_lex_inwhat # define PL_lex_inwhat PL_Ilex_inwhat # endif +# ifndef PL_multi_close +# define PL_multi_close PL_Imulti_close +# endif #endif /* ... Safe version of call_sv() ........................................... */ @@ -255,7 +261,8 @@ static void indirect_map_store(pTHX_ const OP *o, STRLEN pos, SV *sv, line_t lin XSH_LOCAL_REALLOC(oi->buf, oi->size, len, char); oi->size = len; } - Copy(s, oi->buf, len, char); + if (oi->buf) + Copy(s, oi->buf, len, char); oi->len = len; oi->pos = pos; @@ -333,8 +340,11 @@ static OP *indirect_ck_const(pTHX_ OP *o) { if (SvPOK(sv) && (SvTYPE(sv) >= SVt_PV)) { STRLEN pos; + const char *bufptr; + + bufptr = PL_multi_close == '<' ? PL_bufptr : PL_oldbufptr; - if (indirect_find(sv, PL_oldbufptr, &pos)) { + if (indirect_find(sv, bufptr, &pos)) { STRLEN len; /* If the constant is equal to the current package name, try to look for