Change 30099 by [EMAIL PROTECTED] on 2007/02/02 21:14:53

        Integrate:
        [ 29644]
        As freeing up PL_linestr is now done via the scope stack, there's no
        need to make any temporary varariable a mortal, and waste effort on
        the temp stack (not) clearing it up.
        
        [ 29647]
        Rationalise the logic in lex_start for creating a new temporary if the
        passed in SV is read only or doesn't end in ';'. Also, allow a NULL
        pointer to imply a zero length string, which saves creating a mortal
        in pp_require, only for it to be ignored in favour of a new SV.
        
        [ 29685]
        Subject: Re: [PATCH] Symbian port: add Series 90 support
        From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
        Date: Thu, 04 Jan 2007 03:35:54 -0500
        Message-ID: <[EMAIL PROTECTED]>
        
        Fixes a VC7/VC7.1 linker error following #29650/#29651

Affected files ...

... //depot/maint-5.8/perl/embed.fnc#204 integrate
... //depot/maint-5.8/perl/perl.h#153 integrate
... //depot/maint-5.8/perl/pp_ctl.c#169 integrate
... //depot/maint-5.8/perl/proto.h#195 integrate
... //depot/maint-5.8/perl/toke.c#163 integrate
... //depot/maint-5.8/perl/util.c#142 integrate

Differences ...

==== //depot/maint-5.8/perl/embed.fnc#204 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#203~30075~   2007-01-29 15:16:13.000000000 -0800
+++ perl/embed.fnc      2007-02-02 13:14:53.000000000 -0800
@@ -402,7 +402,7 @@
 pP     |I32    |keyword        |NN char* d|I32 len
 Ap     |void   |leave_scope    |I32 base
 p      |void   |lex_end
-p      |void   |lex_start      |NN SV* line
+p      |void   |lex_start      |NULLOK SV* line
 Ap     |void   |op_null        |NN OP* o
 p      |void   |op_clear       |NN OP* o
 p      |OP*    |linklist       |NN OP* o

==== //depot/maint-5.8/perl/pp_ctl.c#169 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#168~30098~    2007-02-02 12:54:46.000000000 -0800
+++ perl/pp_ctl.c       2007-02-02 13:14:53.000000000 -0800
@@ -3339,7 +3339,7 @@
 
     ENTER;
     SAVETMPS;
-    lex_start(sv_2mortal(newSVpvs("")));
+    lex_start(NULL);
     SAVEGENERICSV(PL_rsfp_filters);
     PL_rsfp_filters = NULL;
 

==== //depot/maint-5.8/perl/toke.c#163 (text) ====
Index: perl/toke.c
--- perl/toke.c#162~30098~      2007-02-02 12:54:46.000000000 -0800
+++ perl/toke.c 2007-02-02 13:14:53.000000000 -0800
@@ -602,17 +602,24 @@
     PL_nexttoke = 0;
     PL_lex_inwhat = 0;
     PL_sublex_info.sub_inwhat = 0;
-    PL_linestr = line;
-    s = SvPV_const(PL_linestr, len);
-    if (SvREADONLY(PL_linestr) || !len || s[len-1] != ';') {
-       PL_linestr = sv_2mortal(len ? newSVsv(PL_linestr) : newSVpvn(s, 0));
-       if (!len || s[len-1] != ';')
+    if (line) {
+       s = SvPV_const(line, len);
+    } else {
+       len = 0;
+    }
+    if (!len) {
+       PL_linestr = newSVpvs("\n;");
+    } else if (SvREADONLY(line) || s[len-1] != ';') {
+       PL_linestr = newSVsv(line);
+       if (s[len-1] != ';')
            sv_catpvs(PL_linestr, "\n;");
+    } else {
+       SvTEMP_off(line);
+       SvREFCNT_inc_simple_void_NN(line);
+       PL_linestr = line;
     }
-    SvTEMP_off(PL_linestr);
     /* PL_linestr needs to survive until end of scope, not just the next
        FREETMPS. See changes 17505 and 17546 which fixed the symptoms only.  */
-    SvREFCNT_inc_simple_void_NN(PL_linestr);
     SAVEFREESV(PL_linestr);
     PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = PL_linestart = 
SvPVX(PL_linestr);
     PL_bufend = PL_bufptr + SvCUR(PL_linestr);

==== //depot/maint-5.8/perl/util.c#142 (text) ====
Index: perl/util.c
--- perl/util.c#141~30077~      2007-01-29 15:50:30.000000000 -0800
+++ perl/util.c 2007-02-02 13:14:53.000000000 -0800
@@ -5098,6 +5098,12 @@
 }
 #endif
 
+#if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_MSC_VER < 1400) && (WINVER < 
0x0500)
+/* VC7 or 7.1, building with pre-VC7 runtime libraries. */
+long _ftol( double ); /* Defined by VC6 C libs. */
+long _ftol2( double dblSource ) { return _ftol( dblSource ); }
+#endif
+
 void
 Perl_get_db_sub(pTHX_ SV **svp, CV *cv)
 {
End of Patch.

Reply via email to