Skip to content

Commit ca4ce29

Browse files
committed
Make Perl_sv_mortalcopy a macro and rm from mathoms
93f23f0 made the Perl_ name generation automatic given the flags in embed.fnc. This function behaves differently when called from core than not, but making it into a macro that gets expanded as needed means it automatically gets expanded correctly.
1 parent a5fc9ab commit ca4ce29

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

embed.fnc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3268,7 +3268,7 @@ Adp |MAGIC *|sv_magicext |NN SV * const sv \
32683268
EXp |MAGIC *|sv_magicext_mglob \
32693269
|NN SV *sv
32703270
Adp |SV * |sv_2mortal |NULLOK SV * const sv
3271-
AMRbdp |SV * |sv_mortalcopy |NULLOK SV * const oldsv
3271+
ARdmp |SV * |sv_mortalcopy |NULLOK SV * const oldsv
32723272
ARdp |SV * |sv_mortalcopy_flags \
32733273
|NULLOK SV * const oldsv \
32743274
|U32 flags

embed.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2313,6 +2313,7 @@
23132313
# define Perl_sv_eq(mTHX,a,b) sv_eq(a,b)
23142314
# define Perl_sv_force_normal(mTHX,a) sv_force_normal(a)
23152315
# define Perl_sv_insert(mTHX,a,b,c,d,e) sv_insert(a,b,c,d,e)
2316+
# define Perl_sv_mortalcopy(mTHX,a) sv_mortalcopy(a)
23162317
# define Perl_sv_pvn_force(mTHX,a,b) sv_pvn_force(a,b)
23172318
# define Perl_sv_taint(mTHX,a) sv_taint(a)
23182319
# define Perl_sv_unref(mTHX,a) sv_unref(a)
@@ -2366,6 +2367,7 @@
23662367
# define Perl_sv_eq sv_eq
23672368
# define Perl_sv_force_normal sv_force_normal
23682369
# define Perl_sv_insert sv_insert
2370+
# define Perl_sv_mortalcopy sv_mortalcopy
23692371
# define Perl_sv_pvn_force sv_pvn_force
23702372
# define Perl_sv_taint sv_taint
23712373
# define Perl_sv_unref sv_unref

mathoms.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,6 @@ Perl_newHV(pTHX)
297297
return hv;
298298
}
299299

300-
SV *
301-
Perl_sv_mortalcopy(pTHX_ SV *const oldsv)
302-
{
303-
return Perl_sv_mortalcopy_flags(aTHX_ oldsv, SV_GMAGIC);
304-
}
305-
306300
/*
307301
=for apidoc_section $unicode
308302
=for apidoc utf8_to_uvuni

proto.h

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

0 commit comments

Comments
 (0)