sR |char* |scan_trans |NN char *start
s |char* |scan_word |NN char *s|NN char *dest|STRLEN destlen \
|int allow_package|NN STRLEN *slp
-s |void |update_debugger_info_pv|NN const char *buf|STRLEN len
-s |void |update_debugger_info_sv|NN SV *orig_sv
+s |void |update_debugger_info|NULLOK SV *orig_sv \
+ |NULLOK const char *buf|STRLEN len
sR |char* |skipspace |NN char *s
sR |char* |swallow_bom |NN U8 *s
s |void |checkcomma |NN const char *s|NN const char *name \
#define scan_subst S_scan_subst
#define scan_trans S_scan_trans
#define scan_word S_scan_word
-#define update_debugger_info_pv S_update_debugger_info_pv
-#define update_debugger_info_sv S_update_debugger_info_sv
+#define update_debugger_info S_update_debugger_info
#define skipspace S_skipspace
#define swallow_bom S_swallow_bom
#define checkcomma S_checkcomma
#define scan_subst(a) S_scan_subst(aTHX_ a)
#define scan_trans(a) S_scan_trans(aTHX_ a)
#define scan_word(a,b,c,d,e) S_scan_word(aTHX_ a,b,c,d,e)
-#define update_debugger_info_pv(a,b) S_update_debugger_info_pv(aTHX_ a,b)
-#define update_debugger_info_sv(a) S_update_debugger_info_sv(aTHX_ a)
+#define update_debugger_info(a,b,c) S_update_debugger_info(aTHX_ a,b,c)
#define skipspace(a) S_skipspace(aTHX_ a)
#define swallow_bom(a) S_swallow_bom(aTHX_ a)
#define checkcomma(a,b,c) S_checkcomma(aTHX_ a,b,c)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_5);
-STATIC void S_update_debugger_info_pv(pTHX_ const char *buf, STRLEN len)
- __attribute__nonnull__(pTHX_1);
-
-STATIC void S_update_debugger_info_sv(pTHX_ SV *orig_sv)
- __attribute__nonnull__(pTHX_1);
-
+STATIC void S_update_debugger_info(pTHX_ SV *orig_sv, const char *buf, STRLEN len);
STATIC char* S_skipspace(pTHX_ char *s)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
#endif
STATIC void
-S_update_debugger_info_pv(pTHX_ const char *buf, STRLEN len)
+S_update_debugger_info(pTHX_ SV *orig_sv, const char *buf, STRLEN len)
{
AV *av = CopFILEAVx(PL_curcop);
if (av) {
SV * const sv = newSV(0);
sv_upgrade(sv, SVt_PVMG);
- sv_setpvn(sv, buf, len);
- (void)SvIOK_on(sv);
- SvIV_set(sv, 0);
- av_store(av, (I32)CopLINE(PL_curcop), sv);
- }
-}
-
-STATIC void
-S_update_debugger_info_sv(pTHX_ SV *orig_sv)
-{
- AV *av = CopFILEAVx(PL_curcop);
- if (av) {
- SV * const sv = newSV(0);
- sv_upgrade(sv, SVt_PVMG);
- sv_setsv(sv, orig_sv);
+ if (orig_sv)
+ sv_setsv(sv, orig_sv);
+ else
+ sv_setpvn(sv, buf, len);
(void)SvIOK_on(sv);
SvIV_set(sv, 0);
av_store(av, (I32)CopLINE(PL_curcop), sv);
* so store the line into the debugger's array of lines
*/
if (PERLDB_LINE && PL_curstash != PL_debstash)
- update_debugger_info_pv(PL_bufptr, PL_bufend - PL_bufptr);
+ update_debugger_info(NULL, PL_bufptr, PL_bufend - PL_bufptr);
}
#ifdef PERL_MAD
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
PL_last_lop = PL_last_uni = NULL;
if (PERLDB_LINE && PL_curstash != PL_debstash)
- update_debugger_info_sv(PL_linestr);
+ update_debugger_info(PL_linestr, NULL, 0);
goto retry;
}
do {
} while (PL_doextract);
PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = PL_linestart = s;
if (PERLDB_LINE && PL_curstash != PL_debstash)
- update_debugger_info_sv(PL_linestr);
+ update_debugger_info(PL_linestr, NULL, 0);
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
PL_last_lop = PL_last_uni = NULL;
if (CopLINE(PL_curcop) == 1) {
PL_bufend[-1] = '\n';
#endif
if (PERLDB_LINE && PL_curstash != PL_debstash)
- update_debugger_info_sv(PL_linestr);
+ update_debugger_info(PL_linestr, NULL, 0);
if (*s == term && memEQ(s,PL_tokenbuf,len)) {
STRLEN off = PL_bufend - 1 - SvPVX_const(PL_linestr);
*(SvPVX(PL_linestr) + off ) = ' ';
/* update debugger info */
if (PERLDB_LINE && PL_curstash != PL_debstash)
- update_debugger_info_sv(PL_linestr);
+ update_debugger_info(PL_linestr, NULL, 0);
/* having changed the buffer, we must update PL_bufend */
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);