is_gv_magical() is only called from within gv.c.
Nicholas Clark [Wed, 26 Nov 2008 20:14:02 +0000 (20:14 +0000)]
p4raw-id: //depot/perl@34926

embed.fnc
embed.h
gv.c
proto.h

index b7deb6b..e061031 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -383,7 +383,9 @@ pd  |U32    |intro_my
 ApPR   |char*  |instr          |NN const char* big|NN const char* little
 p      |bool   |io_close       |NN IO* io|bool not_implicit
 pR     |OP*    |invert         |NULLOK OP* cmd
-dpR    |bool   |is_gv_magical  |NN const char *name|STRLEN len|U32 flags
+#if defined(PERL_IN_GV_C)
+sdR    |bool   |is_gv_magical  |NN const char *name|STRLEN len|U32 flags
+#endif
 ApR    |I32    |is_lvalue_sub
 ApPR   |U32    |to_uni_upper_lc|U32 c
 ApPR   |U32    |to_uni_title_lc|U32 c
diff --git a/embed.h b/embed.h
index d5768db..2c39f1b 100644 (file)
--- a/embed.h
+++ b/embed.h
 #ifdef PERL_CORE
 #define io_close               Perl_io_close
 #define invert                 Perl_invert
-#define is_gv_magical          Perl_is_gv_magical
+#endif
+#if defined(PERL_IN_GV_C)
+#ifdef PERL_CORE
+#define is_gv_magical          S_is_gv_magical
+#endif
 #endif
 #define is_lvalue_sub          Perl_is_lvalue_sub
 #define to_uni_upper_lc                Perl_to_uni_upper_lc
 #ifdef PERL_CORE
 #define io_close(a,b)          Perl_io_close(aTHX_ a,b)
 #define invert(a)              Perl_invert(aTHX_ a)
-#define is_gv_magical(a,b,c)   Perl_is_gv_magical(aTHX_ a,b,c)
+#endif
+#if defined(PERL_IN_GV_C)
+#ifdef PERL_CORE
+#define is_gv_magical(a,b,c)   S_is_gv_magical(aTHX_ a,b,c)
+#endif
 #endif
 #define is_lvalue_sub()                Perl_is_lvalue_sub(aTHX)
 #define to_uni_upper_lc(a)     Perl_to_uni_upper_lc(aTHX_ a)
diff --git a/gv.c b/gv.c
index 58e6f8f..598eb9e 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -2244,7 +2244,7 @@ pointers returned by SvPV.
 =cut
 */
 bool
-Perl_is_gv_magical(pTHX_ const char *name, STRLEN len, U32 flags)
+S_is_gv_magical(pTHX_ const char *name, STRLEN len, U32 flags)
 {
     PERL_UNUSED_CONTEXT;
     PERL_UNUSED_ARG(flags);
diff --git a/proto.h b/proto.h
index c4c0c01..4d5c83e 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -1148,12 +1148,14 @@ PERL_CALLCONV bool      Perl_io_close(pTHX_ IO* io, bool not_implicit)
 PERL_CALLCONV OP*      Perl_invert(pTHX_ OP* cmd)
                        __attribute__warn_unused_result__;
 
-PERL_CALLCONV bool     Perl_is_gv_magical(pTHX_ const char *name, STRLEN len, U32 flags)
+#if defined(PERL_IN_GV_C)
+STATIC bool    S_is_gv_magical(pTHX_ const char *name, STRLEN len, U32 flags)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_IS_GV_MAGICAL \
        assert(name)
 
+#endif
 PERL_CALLCONV I32      Perl_is_lvalue_sub(pTHX)
                        __attribute__warn_unused_result__;