diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-08-28 10:47:42 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-08-28 10:50:37 +0200 |
commit | c47d1a661f01f02ad5b41aa6275b11a9bd5a1dd2 (patch) | |
tree | 06e129e04c754eb34633205231320b0a169d8dc1 /proto.h | |
parent | 4df947eef25458ac284980050e91eacbe0a1bf97 (diff) | |
download | perl-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.h | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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); |