summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-08-28 10:47:42 +0200
committerNicholas Clark <nick@ccl4.org>2013-08-28 10:50:37 +0200
commitc47d1a661f01f02ad5b41aa6275b11a9bd5a1dd2 (patch)
tree06e129e04c754eb34633205231320b0a169d8dc1 /proto.h
parent4df947eef25458ac284980050e91eacbe0a1bf97 (diff)
downloadperl-c47d1a661f01f02ad5b41aa6275b11a9bd5a1dd2.tar.gz
Only predeclare S_sv_or_pv_pos_u2b for -DPERL_CORE or -DPERL_EXT
Otherwise when compiling XS code, there is a declaration for a function which is never used, which can cause some compilers to issue a warning.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/proto.h b/proto.h
index 5b3a98f27e..30fcba5ef5 100644
--- a/proto.h
+++ b/proto.h
@@ -4167,12 +4167,6 @@ PERL_CALLCONV NV Perl_sv_nv(pTHX_ SV* sv)
#define PERL_ARGS_ASSERT_SV_NV \
assert(sv)
-PERL_STATIC_INLINE STRLEN S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp)
- __attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_SV_OR_PV_POS_U2B \
- assert(sv); assert(pv)
-
PERL_CALLCONV char* Perl_sv_peek(pTHX_ SV* sv);
PERL_CALLCONV void Perl_sv_pos_b2u(pTHX_ SV *const sv, I32 *const offsetp)
__attribute__nonnull__(pTHX_2);
@@ -5443,6 +5437,14 @@ PERL_CALLCONV void Perl_Slab_to_rw(pTHX_ OPSLAB *const slab)
# endif
#endif
+#if defined(PERL_CORE) || defined (PERL_EXT)
+PERL_STATIC_INLINE STRLEN S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_SV_OR_PV_POS_U2B \
+ assert(sv); assert(pv)
+
+#endif
#if defined(PERL_CR_FILTER)
# if defined(PERL_IN_TOKE_C)
STATIC I32 S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen);