Skip to content

Commit de36a92

Browse files
committed
Dumper.xs: Use PERL_MAGIC_vstring symbolic constant rather than 'V' character literal
The symbolic name is just a name for the character constant, but doing this makes it possible to find e.g. via grep.
1 parent 3e734cb commit de36a92

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dist/Data-Dumper/Dumper.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ our ( $Indent, $Trailingcomma, $Purity, $Pad, $Varname, $Useqq, $Terse, $Freezer
3030
our ( @ISA, @EXPORT, @EXPORT_OK, $VERSION );
3131

3232
BEGIN {
33-
$VERSION = '2.191'; # Don't forget to set version and release
33+
$VERSION = '2.192'; # Don't forget to set version and release
3434
# date in POD below!
3535

3636
@ISA = qw(Exporter);

dist/Data-Dumper/Dumper.xs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
13861386
sv_catpvs(retval, "undef");
13871387
}
13881388
#ifdef SvVOK
1389-
else if (SvMAGICAL(val) && (mg = mg_find(val, 'V'))) {
1389+
else if (SvMAGICAL(val) && (mg = mg_find(val, PERL_MAGIC_vstring))) {
13901390
# if !defined(PL_vtbl_vstring) && PERL_VERSION_LT(5,17,0)
13911391
SV * const vecsv = sv_newmortal();
13921392
# if PERL_VERSION_LT(5,10,0)
@@ -1703,7 +1703,7 @@ Data_Dumper__vstring(sv)
17031703
#ifdef SvVOK
17041704
const MAGIC *mg;
17051705
RETVAL =
1706-
SvMAGICAL(sv) && (mg = mg_find(sv, 'V'))
1706+
SvMAGICAL(sv) && (mg = mg_find(sv, PERL_MAGIC_vstring))
17071707
? newSVpvn((const char *)mg->mg_ptr, mg->mg_len)
17081708
: &PL_sv_undef;
17091709
#else

0 commit comments

Comments
 (0)