summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-11-24 09:40:44 +0000
committerDavid Mitchell <davem@iabyn.com>2016-11-24 13:42:22 +0000
commite03e82a04dda6a44b815f3367c69afb0e953dc91 (patch)
tree0af20bb6d6d86cda9bedc1c62ebcacde194e382a /proto.h
parentd24e3eb1402c1294265f99342e2ec0ecfd0f5d34 (diff)
downloadperl-e03e82a04dda6a44b815f3367c69afb0e953dc91.tar.gz
add sv_set_undef() API function
This function is equivalent to sv_setsv(sv, &PL_sv_undef), but more efficient. Also change the obvious places in the core to use the new idiom.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index 5ff6bfe32c..b760924114 100644
--- a/proto.h
+++ b/proto.h
@@ -3224,6 +3224,9 @@ PERL_CALLCONV void Perl_sv_resetpvn(pTHX_ const char* s, STRLEN len, HV *const s
PERL_CALLCONV SV* Perl_sv_rvweaken(pTHX_ SV *const sv);
#define PERL_ARGS_ASSERT_SV_RVWEAKEN \
assert(sv)
+PERL_CALLCONV void Perl_sv_set_undef(pTHX_ SV *sv);
+#define PERL_ARGS_ASSERT_SV_SET_UNDEF \
+ assert(sv)
PERL_CALLCONV void Perl_sv_sethek(pTHX_ SV *const sv, const HEK *const hek);
#define PERL_ARGS_ASSERT_SV_SETHEK \
assert(sv)