cvs commit: ponie/perl/ext/B B.xs
[email protected] (Nicholas Clark) 16 Oct 2004 22:31:40 -0000
| Newsgroups | perl.ponie.changes |
|---|---|
| Message-ID | <[email protected]> |
cvsuser 04/10/16 15:31:39
Modified: . Configure.pl
perl sv.h
perl/ext/B B.xs
Log:
Make SvFLAGS() an RVALUE (outside sv.c). Implies dropping support for
ByteLoader, because it expects to directly rebuild SVs from there component
atoms, bits, er, whatever. B.xs was the only non-core file directly
manipulating SvFLAGS() [and only once, to turn on UTF8] - now fixed.
This change may break more CPAN modules. Testing will reveal how widespread
the problems this causes are. (if any)
Revision Changes Path
1.40 +4 -1 ponie/Configure.pl
Index: Configure.pl
===================================================================
RCS file: /cvs/public/ponie/Configure.pl,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -w -r1.39 -r1.40
--- Configure.pl 14 Oct 2004 11:44:38 -0000 1.39
+++ Configure.pl 16 Oct 2004 22:31:39 -0000 1.40
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# $Id: Configure.pl,v 1.39 2004/10/14 11:44:38 nicholas Exp $
+# $Id: Configure.pl,v 1.40 2004/10/16 22:31:39 nicholas Exp $
use strict;
use Config;
@@ -44,6 +44,9 @@
}
# push @config_args,'-Dnoextensions=Encode';
+# ByteLoader expects to be able to set the SvFLAGS directly. ByteLoader becomes
+# irrelevant with Ponie.
+push @config_args,'-Dnoextensions=ByteLoader';
push @config_args,'-d'; # Defaults
# exit before running makedepend. This means we need to extract .SH ourselves.
push @config_args,'-E';
1.49 +8 -1 ponie/perl/sv.h
Index: sv.h
===================================================================
RCS file: /cvs/public/ponie/perl/sv.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -w -r1.48 -r1.49
--- sv.h 16 Oct 2004 19:04:22 -0000 1.48
+++ sv.h 16 Oct 2004 22:31:39 -0000 1.49
@@ -136,7 +136,14 @@
#define SvANY(sv) (*Perl_macro_SvANY(aTHX_ (SV *) (sv)))
#define SvREFCNT(sv) (*Perl_macro_SvREFCNT(aTHX_ (SV *) (sv)))
+#if defined(PERL_CORE) && defined(PERL_IN_SV_C)
+/* sv.c will be replaced with PMC code to clone things etc, so little point
+ in re-working it to avoid all LVALUE accesses at this point. */
#define SvFLAGS(sv) (*Perl_macro_SvFLAGS(aTHX_ (SV *) (sv)))
+#else
+/* No longer an LVALUE */
+# define SvFLAGS(sv) (0 + *Perl_macro_SvFLAGS(aTHX_ (SV *) (sv)))
+#endif
#define SvPMC(sv) 1
#define SvPMC_on(sv) ;
1.3 +2 -1 ponie/perl/ext/B/B.xs
Index: B.xs
===================================================================
RCS file: /cvs/public/ponie/perl/ext/B/B.xs,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- B.xs 24 Jun 2004 10:04:17 -0000 1.2
+++ B.xs 16 Oct 2004 22:31:39 -0000 1.3
@@ -1174,7 +1174,8 @@
ST(0) = sv_newmortal();
if( SvPOK(sv) ) {
sv_setpvn(ST(0), SvPVX(sv), SvCUR(sv));
- SvFLAGS(ST(0)) |= SvUTF8(sv);
+ if (SvUTF8(sv))
+ SvUTF8_on(ST(0));
}
else {
/* XXX for backward compatibility, but should fail */