[PATCH] LvTYPE
[email protected] (Nicholas Clark) Tue, 2 Mar 2004 11:21:34 +0000
| Newsgroups | perl.ponie.dev |
|---|---|
| Message-ID | <[email protected]> |
Sooo, London Underground decided to pull a tube train out of service due to
a "defective PA system".
Making the best of a bad job, I waited at the station for a while until the
tubes were calmer, and hacked on ponie for a bit. I found the causes of some
compiler warnings, and cleared most [patch following soon]
However, Arthur spotted that one of my tidy ups actually exposes an error
in the LvTYPE macro implementation
Patch appended - needs regen headers.
Nicholas Clark
Index: embed.fnc
===================================================================
RCS file: /cvs/public/ponie/perl/embed.fnc,v
retrieving revision 1.10
diff -p -u -r1.10 embed.fnc
--- embed.fnc 29 Feb 2004 18:02:19 -0000 1.10
+++ embed.fnc 2 Mar 2004 11:13:49 -0000
@@ -993,7 +993,7 @@ Ap |NV* |macro_SvNVX |SV *
Ap |UV* |macro_SvUVX |SV *
Ap |MAGIC** |macro_SvMAGIC |SV *
Ap |HV** |macro_SvSTASH |SV *
-Ap |char** |macro_LvTYPE |SV *
+Ap |char* |macro_LvTYPE |SV *
Ap |SV** |macro_LvTARG |SV *
Ap |STRLEN* |macro_LvTARGLEN |SV *
Ap |STRLEN* |macro_LvTARGOFF |SV *
Index: sv.h
===================================================================
RCS file: /cvs/public/ponie/perl/sv.h,v
retrieving revision 1.9
diff -p -u -r1.9 sv.h
--- sv.h 29 Feb 2004 22:05:42 -0000 1.9
+++ sv.h 2 Mar 2004 11:13:49 -0000
@@ -786,7 +786,7 @@ and leaves the UTF8 status as it was.
#define FmLINES(sv) ((XPVFM*) SvANY(sv))->xfm_lines
-#define LvTYPE(sv) ((char*)*Perl_macro_LvTYPE(aTHX_ (SV*)sv))
+#define LvTYPE(sv) (*Perl_macro_LvTYPE(aTHX_ (SV*)sv))
#define LvTARG(sv) ((SV*)*Perl_macro_LvTARG(aTHX_ (SV*)sv))
#define LvTARGOFF(sv) ( * Perl_macro_LvTARGOFF(aTHX_ (SV*)sv))
#define LvTARGLEN(sv) ( * Perl_macro_LvTARGLEN(aTHX_ (SV*)sv))
Index: sv.c
===================================================================
RCS file: /cvs/public/ponie/perl/sv.c,v
retrieving revision 1.12
diff -p -u -r1.12 sv.c
--- sv.c 29 Feb 2004 22:06:18 -0000 1.12
+++ sv.c 2 Mar 2004 11:13:52 -0000
@@ -1347,12 +1347,12 @@ STRLEN* Perl_macro_SvCUR (pTHX_ SV *sv)
}
-char** Perl_macro_LvTYPE (pTHX_ SV* sv) {
+char* Perl_macro_LvTYPE (pTHX_ SV* sv) {
XPVLV* data;
if(!SvPMC(sv))
abort();
data = (XPVLV*) Parrot_PMC_get_pointer(PL_Parrot, SvANY(sv));
- return (char**) &(data->xlv_type);
+ return &(data->xlv_type);
}
SV** Perl_macro_LvTARG (pTHX_ SV* sv) {