This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make xs_version_bootcheck() appear only in util.c
authorDavid Mitchell <davem@iabyn.com>
Tue, 9 Dec 2014 10:19:53 +0000 (10:19 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 9 Dec 2014 10:23:16 +0000 (10:23 +0000)
672cbd159cb9 converted xs_version_bootcheck() into a static function,
but forgot to wrap the embed.fnc entry with "#if defined(PERL_IN_UTIL_C)",
so it was generating a compiler warning in every file that proto.h was
included in.

embed.fnc
proto.h

index 01d9526..39d3d8d 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -2698,8 +2698,10 @@ Apo      |int    |my_cxt_index   |NN const char *my_cxt_key
 Apo    |void*  |my_cxt_init    |NN int *index|size_t size
 #endif
 #endif
+#if defined(PERL_IN_UTIL_C)
 so     |void   |xs_version_bootcheck|U32 items|U32 ax|NN const char *xs_p \
                                |STRLEN xs_len
+#endif
 Xpon   |I32    |xs_handshake   |const U32 key|NN void * v_my_perl\
                                |NN const char * file| ...
 Xp     |void   |xs_boot_epilog |const U32 ax
diff --git a/proto.h b/proto.h
index 5bbfdbe..0b9addf 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -5236,11 +5236,6 @@ PERL_CALLCONV I32        Perl_xs_handshake(const U32 key, void * v_my_perl, const char
 #define PERL_ARGS_ASSERT_XS_HANDSHAKE  \
        assert(v_my_perl); assert(file)
 
-STATIC void    S_xs_version_bootcheck(pTHX_ U32 items, U32 ax, const char *xs_p, STRLEN xs_len)
-                       __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT_XS_VERSION_BOOTCHECK  \
-       assert(xs_p)
-
 PERL_CALLCONV int      Perl_yyerror(pTHX_ const char *const s)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_YYERROR       \
@@ -7958,6 +7953,11 @@ STATIC SV *      S_with_queued_errors(pTHX_ SV *ex)
 #define PERL_ARGS_ASSERT_WITH_QUEUED_ERRORS    \
        assert(ex)
 
+STATIC void    S_xs_version_bootcheck(pTHX_ U32 items, U32 ax, const char *xs_p, STRLEN xs_len)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT_XS_VERSION_BOOTCHECK  \
+       assert(xs_p)
+
 #  if defined(PERL_MEM_LOG) && !defined(PERL_MEM_LOG_NOIMPL)
 STATIC void    S_mem_log_common(enum mem_log_type mlt, const UV n, const UV typesize, const char *type_name, const SV *sv, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname)
                        __attribute__nonnull__(4)