Skip to content

Commit 95d2ddd

Browse files
committed
Create embed.fnc entry for pv_display_flags_
This creates an ARGS_ASSERT for this function. Previously, the code was using the one for plain pv_display(), which is kind of ugly. Now there is a macro for each function
1 parent 6c88ed2 commit 95d2ddd

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

dump.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ S_append_flags(pTHX_ SV *sv, U32 flags, const struct flag_to_name *start,
9595
| ((utf8) ? PERL_PV_ESCAPE_UNI : 0) )
9696

9797
#define _pv_display_for_dump(dsv, pv, cur, len, pvlim) \
98-
pv_display_flags(aTHX_ dsv, pv, cur, len, pvlim, PERL_PV_ESCAPE_DWIM_ALL_HEX)
98+
pv_display_flags(dsv, pv, cur, len, pvlim, PERL_PV_ESCAPE_DWIM_ALL_HEX)
9999

100100
/*
101101
=for apidoc pv_escape
@@ -417,9 +417,9 @@ Perl_pv_pretty( pTHX_ SV *dsv, char const * const str, const STRLEN count,
417417
}
418418

419419
STATIC char *
420-
pv_display_flags(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim, I32 pretty_flags)
420+
S_pv_display_flags(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim, I32 pretty_flags)
421421
{
422-
PERL_ARGS_ASSERT_PV_DISPLAY;
422+
PERL_ARGS_ASSERT_PV_DISPLAY_FLAGS;
423423

424424
pv_pretty( dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP | pretty_flags );
425425
if (len > cur && pv[cur] == '\0')
@@ -445,7 +445,9 @@ Note that the final string may be up to 7 chars longer than pvlim.
445445
char *
446446
Perl_pv_display(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)
447447
{
448-
return pv_display_flags(aTHX_ dsv, pv, cur, len, pvlim, 0);
448+
PERL_ARGS_ASSERT_PV_DISPLAY;
449+
450+
return pv_display_flags(dsv, pv, cur, len, pvlim, 0);
449451
}
450452

451453
/*

embed.fnc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4460,6 +4460,13 @@ ERXp |const char *|form_cp_too_large_msg \
44604460
S |CV * |deb_curcv |I32 ix
44614461
Sd |void |debprof |NN const OP *o
44624462
S |SV * |pm_description |NN const PMOP *pm
4463+
S |char * |pv_display_flags \
4464+
|NN SV *dsv \
4465+
|NN const char *pv \
4466+
|STRLEN cur \
4467+
|STRLEN len \
4468+
|STRLEN pvlim \
4469+
|I32 pretty_flags
44634470
S |UV |sequence_num |NULLOK const OP *o
44644471
#endif
44654472
#if defined(PERL_IN_DUMP_C) || defined(PERL_IN_HV_C) || \

embed.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,7 @@
13401340
# define deb_curcv(a) S_deb_curcv(aTHX_ a)
13411341
# define debprof(a) S_debprof(aTHX_ a)
13421342
# define pm_description(a) S_pm_description(aTHX_ a)
1343+
# define pv_display_flags(a,b,c,d,e,f) S_pv_display_flags(aTHX_ a,b,c,d,e,f)
13431344
# define sequence_num(a) S_sequence_num(aTHX_ a)
13441345
# endif
13451346
# if defined(PERL_IN_GV_C)

proto.h

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)