I added the global string constant PL_isa_DOES recently. This caused
t/porting/libperl.t to fail under -DPERL_GLOBAL_STRUCT_PRIVATE builds.
This commit makes PL_isa_DOES be declared and defined in a similar
way to other such global constants. This is pure cargo-culting - I have no
real idea of the point of all the EXTCONST, INIT and globvar.sym stuff.
PL_inf
PL_interp_size
PL_interp_size_5_18_0
PL_inf
PL_interp_size
PL_interp_size_5_18_0
PL_keyword_plugin
PL_latin1_lc
PL_magic_data
PL_keyword_plugin
PL_latin1_lc
PL_magic_data
EXTCONST char PL_uuemap[65]
INIT("`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_");
EXTCONST char PL_uuemap[65]
INIT("`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_");
+/* a special string address whose value is "isa", but which perl knows
+ * to treat as if it were really "DOES" when printing the method name in
+ * the "Can't call method '%s'" error message */
+EXTCONST char PL_isa_DOES[]
+ INIT("isa");
+
#ifdef DOINIT
EXTCONST char PL_uudmap[256] =
# ifdef PERL_MICRO
#ifdef DOINIT
EXTCONST char PL_uudmap[256] =
# ifdef PERL_MICRO
-extern char PL_isa_DOES[];
-
PERL_STATIC_INLINE HV *
S_opmethod_stash(pTHX_ SV* meth)
{
PERL_STATIC_INLINE HV *
S_opmethod_stash(pTHX_ SV* meth)
{
-/* a special string address whose value is "isa", but which perl knows
- * to treat as if it were really "DOES" when printing the method name in
- * the "Can't call method '%s'" error message */
-char PL_isa_DOES[] = "isa";
-
bool
Perl_sv_does_sv(pTHX_ SV *sv, SV *namesv, U32 flags)
{
bool
Perl_sv_does_sv(pTHX_ SV *sv, SV *namesv, U32 flags)
{
methodname = newSV_type(SVt_PV);
SvLEN(methodname) = 0;
SvCUR(methodname) = strlen(PL_isa_DOES);
methodname = newSV_type(SVt_PV);
SvLEN(methodname) = 0;
SvCUR(methodname) = strlen(PL_isa_DOES);
- SvPVX(methodname) = PL_isa_DOES;
+ SvPVX(methodname) = (char *)PL_isa_DOES; /* discard 'const' qualifier */
SvPOK_on(methodname);
sv_2mortal(methodname);
call_sv(methodname, G_SCALAR | G_METHOD);
SvPOK_on(methodname);
sv_2mortal(methodname);
call_sv(methodname, G_SCALAR | G_METHOD);