diff options
-rw-r--r-- | embed.fnc | 4 | ||||
-rw-r--r-- | proto.h | 4 | ||||
-rw-r--r-- | sv.c | 15 |
3 files changed, 11 insertions, 12 deletions
@@ -985,8 +985,8 @@ Apa |PerlIO*|fp_dup |NULLOK PerlIO* fp|char type|NN CLONE_PARAMS* param Apa |DIR* |dirp_dup |NULLOK DIR* dp Apa |GP* |gp_dup |NULLOK GP* gp|NN CLONE_PARAMS* param Apa |MAGIC* |mg_dup |NULLOK MAGIC* mg|NN CLONE_PARAMS* param -Apa |SV* |sv_dup |NULLOK SV* sstr|NN CLONE_PARAMS* param -Ap |void |rvpv_dup |NN SV* dstr|NN SV *sstr|NN CLONE_PARAMS* param +Apa |SV* |sv_dup |NULLOK const SV* sstr|NN CLONE_PARAMS* param +Ap |void |rvpv_dup |NN SV* dstr|NN const SV *sstr|NN CLONE_PARAMS* param Apa |PTR_TBL_t*|ptr_table_new Apa |void* |ptr_table_fetch|NN PTR_TBL_t *tbl|NN const void *sv Ap |void |ptr_table_store|NN PTR_TBL_t *tbl|NULLOK const void *oldsv|NN void *newsv @@ -2765,12 +2765,12 @@ PERL_CALLCONV MAGIC* Perl_mg_dup(pTHX_ MAGIC* mg, CLONE_PARAMS* param) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); -PERL_CALLCONV SV* Perl_sv_dup(pTHX_ SV* sstr, CLONE_PARAMS* param) +PERL_CALLCONV SV* Perl_sv_dup(pTHX_ const SV* sstr, CLONE_PARAMS* param) __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); -PERL_CALLCONV void Perl_rvpv_dup(pTHX_ SV* dstr, SV *sstr, CLONE_PARAMS* param) +PERL_CALLCONV void Perl_rvpv_dup(pTHX_ SV* dstr, const SV *sstr, CLONE_PARAMS* param) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); @@ -9179,7 +9179,7 @@ Perl_ptr_table_free(pTHX_ PTR_TBL_t *tbl) void -Perl_rvpv_dup(pTHX_ SV *dstr, SV *sstr, CLONE_PARAMS* param) +Perl_rvpv_dup(pTHX_ SV *dstr, const SV *sstr, CLONE_PARAMS* param) { if (SvROK(sstr)) { SvRV_set(dstr, SvWEAKREF(sstr) @@ -9225,7 +9225,7 @@ Perl_rvpv_dup(pTHX_ SV *dstr, SV *sstr, CLONE_PARAMS* param) /* duplicate an SV of any type (including AV, HV etc) */ SV * -Perl_sv_dup(pTHX_ SV *sstr, CLONE_PARAMS* param) +Perl_sv_dup(pTHX_ const SV *sstr, CLONE_PARAMS* param) { dVAR; SV *dstr; @@ -9240,12 +9240,11 @@ Perl_sv_dup(pTHX_ SV *sstr, CLONE_PARAMS* param) if(param->flags & CLONEf_JOIN_IN) { /** We are joining here so we don't want do clone something that is bad **/ - const char *hvname; - - if(SvTYPE(sstr) == SVt_PVHV && - (hvname = HvNAME_get(sstr))) { - /** don't clone stashes if they already exist **/ - return (SV*)gv_stashpv(hvname,0); + if (SvTYPE(sstr) == SVt_PVHV) { + const char * const hvname = HvNAME_get(sstr); + if (hvname) + /** don't clone stashes if they already exist **/ + return (SV*)gv_stashpv(hvname,0); } } |