Change 34931 by [EMAIL PROTECTED] on 2008/11/26 21:18:58
Merge S_is_gv_magical() into Perl_is_gv_magical_sv().
Affected files ...
... //depot/perl/embed.fnc#643 edit
... //depot/perl/embed.h#780 edit
... //depot/perl/gv.c#412 edit
... //depot/perl/pod/perlintern.pod#80 edit
... //depot/perl/proto.h#977 edit
Differences ...
==== //depot/perl/embed.fnc#643 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#642~34929~ 2008-11-26 12:53:23.000000000 -0800
+++ perl/embed.fnc 2008-11-26 13:18:58.000000000 -0800
@@ -385,9 +385,6 @@
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
-#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
@@ -1904,7 +1901,7 @@
Ap |GV* |gv_fetchpvn_flags|NN const char* name|STRLEN len|I32
flags|const svtype sv_type
Ap |GV* |gv_fetchsv|NN SV *name|I32 flags|const svtype sv_type
-dpR |bool |is_gv_magical_sv|NN SV *name|U32 flags
+dpR |bool |is_gv_magical_sv|NN SV *const name_sv|U32 flags
ApR |bool |stashpv_hvname_match|NN const COP *c|NN const HV *hv
==== //depot/perl/embed.h#780 (text+w) ====
Index: perl/embed.h
--- perl/embed.h#779~34929~ 2008-11-26 12:53:23.000000000 -0800
+++ perl/embed.h 2008-11-26 13:18:58.000000000 -0800
@@ -334,11 +334,6 @@
#define io_close Perl_io_close
#define invert Perl_invert
#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
#define to_uni_title_lc Perl_to_uni_title_lc
@@ -2681,11 +2676,6 @@
#define io_close(a,b) Perl_io_close(aTHX_ a,b)
#define invert(a) Perl_invert(aTHX_ a)
#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)
#define to_uni_title_lc(a) Perl_to_uni_title_lc(aTHX_ a)
==== //depot/perl/gv.c#412 (text) ====
Index: perl/gv.c
--- perl/gv.c#411~34926~ 2008-11-26 12:14:02.000000000 -0800
+++ perl/gv.c 2008-11-26 13:18:58.000000000 -0800
@@ -2210,25 +2210,6 @@
/*
=for apidoc is_gv_magical_sv
-Returns C<TRUE> if given the name of a magical GV. Calls is_gv_magical.
-
-=cut
-*/
-
-bool
-Perl_is_gv_magical_sv(pTHX_ SV *name, U32 flags)
-{
- STRLEN len;
- const char * const temp = SvPV_const(name, len);
-
- PERL_ARGS_ASSERT_IS_GV_MAGICAL_SV;
-
- return is_gv_magical(temp, len, flags);
-}
-
-/*
-=for apidoc is_gv_magical
-
Returns C<TRUE> if given the name of a magical GV.
Currently only useful internally when determining if a GV should be
@@ -2243,13 +2224,15 @@
=cut
*/
+
bool
-S_is_gv_magical(pTHX_ const char *name, STRLEN len, U32 flags)
+Perl_is_gv_magical_sv(pTHX_ SV *const name_sv, U32 flags)
{
- PERL_UNUSED_CONTEXT;
- PERL_UNUSED_ARG(flags);
+ STRLEN len;
+ const char *const name = SvPV_const(name_sv, len);
- PERL_ARGS_ASSERT_IS_GV_MAGICAL;
+ PERL_UNUSED_ARG(flags);
+ PERL_ARGS_ASSERT_IS_GV_MAGICAL_SV;
if (len > 1) {
const char * const name1 = name + 1;
==== //depot/perl/pod/perlintern.pod#80 (text+w) ====
Index: perl/pod/perlintern.pod
--- perl/pod/perlintern.pod#79~34904~ 2008-11-24 10:48:43.000000000 -0800
+++ perl/pod/perlintern.pod 2008-11-26 13:18:58.000000000 -0800
@@ -334,8 +334,8 @@
=over 8
-=item is_gv_magical
-X<is_gv_magical>
+=item is_gv_magical_sv
+X<is_gv_magical_sv>
Returns C<TRUE> if given the name of a magical GV.
@@ -349,16 +349,6 @@
This assumption is met by all callers within the perl core, which all pass
pointers returned by SvPV.
- bool is_gv_magical(const char *name, STRLEN len, U32 flags)
-
-=for hackers
-Found in file gv.c
-
-=item is_gv_magical_sv
-X<is_gv_magical_sv>
-
-Returns C<TRUE> if given the name of a magical GV. Calls is_gv_magical.
-
bool is_gv_magical_sv(SV *name, U32 flags)
=for hackers
==== //depot/perl/proto.h#977 (text+w) ====
Index: perl/proto.h
--- perl/proto.h#976~34929~ 2008-11-26 12:53:23.000000000 -0800
+++ perl/proto.h 2008-11-26 13:18:58.000000000 -0800
@@ -1150,14 +1150,6 @@
PERL_CALLCONV OP* Perl_invert(pTHX_ OP* cmd)
__attribute__warn_unused_result__;
-#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__;
@@ -6320,11 +6312,11 @@
#define PERL_ARGS_ASSERT_GV_FETCHSV \
assert(name)
-PERL_CALLCONV bool Perl_is_gv_magical_sv(pTHX_ SV *name, U32 flags)
+PERL_CALLCONV bool Perl_is_gv_magical_sv(pTHX_ SV *const name_sv, U32
flags)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_IS_GV_MAGICAL_SV \
- assert(name)
+ assert(name_sv)
PERL_CALLCONV bool Perl_stashpv_hvname_match(pTHX_ const COP *c, const HV
*hv)
End of Patch.