summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-05-18 16:12:21 +0100
committerNicholas Clark <nick@ccl4.org>2009-05-18 16:12:21 +0100
commit538f2e763fb7d8e8be3faeafc31371e06e22ce2b (patch)
tree9da298b8a01722bd1130b88ffd69578578258831 /proto.h
parentefc36d52fb6a79de18cc6fc155712ba20b7d0414 (diff)
downloadperl-538f2e763fb7d8e8be3faeafc31371e06e22ce2b.tar.gz
Add S_sv_dup_inc_multiple(), used in place of loops that call sv_dup_inc().
Just 4 uses already give a size saving with gcc -Os.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index 8e177f02d0..3f95eb5d71 100644
--- a/proto.h
+++ b/proto.h
@@ -4089,6 +4089,15 @@ PERL_CALLCONV MAGIC* Perl_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *const param)
#define PERL_ARGS_ASSERT_MG_DUP \
assert(param)
+#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
+STATIC SV ** S_sv_dup_inc_multiple(pTHX_ SV *const *source, SV **dest, SSize_t items, CLONE_PARAMS *const param)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2)
+ __attribute__nonnull__(pTHX_4);
+#define PERL_ARGS_ASSERT_SV_DUP_INC_MULTIPLE \
+ assert(source); assert(dest); assert(param)
+
+#endif
PERL_CALLCONV SV* Perl_sv_dup(pTHX_ const SV *const sstr, CLONE_PARAMS *const param)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_2);