Change 31765 by [EMAIL PROTECTED] on 2007/08/30 13:49:14

        Subject: [PATCH] misc blead stuff
        From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
        Date: Wed, 29 Aug 2007 21:04:53 -0400
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/deb.c#55 edit
... //depot/perl/mg.c#498 edit
... //depot/perl/op.c#949 edit
... //depot/perl/pod/perlapi.pod#299 edit
... //depot/perl/pp.c#596 edit
... //depot/perl/pp_sys.c#544 edit
... //depot/perl/reentr.c#32 edit
... //depot/perl/reentr.pl#53 edit
... //depot/perl/regexec.c#545 edit
... //depot/perl/sv.c#1419 edit

Differences ...

==== //depot/perl/deb.c#55 (text) ====
Index: perl/deb.c
--- perl/deb.c#54~29960~        2007-01-24 13:42:53.000000000 -0800
+++ perl/deb.c  2007-08-30 06:49:14.000000000 -0700
@@ -41,15 +41,14 @@
 void
 Perl_deb(pTHX_ const char *pat, ...)
 {
-#ifdef DEBUGGING
     va_list args;
     va_start(args, pat);
+#ifdef DEBUGGING
     vdeb(pat, &args);
-    va_end(args);
 #else
     PERL_UNUSED_CONTEXT;
-    PERL_UNUSED_ARG(pat);
 #endif /* DEBUGGING */
+    va_end(args);
 }
 
 void

==== //depot/perl/mg.c#498 (text) ====
Index: perl/mg.c
--- perl/mg.c#497~31502~        2007-06-29 02:00:32.000000000 -0700
+++ perl/mg.c   2007-08-30 06:49:14.000000000 -0700
@@ -1317,6 +1317,9 @@
 #else
     dTHX;
 #endif
+#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
+   va_list args;
+#endif
 #ifdef FAKE_PERSISTENT_SIGNAL_HANDLERS
     (void) rsignal(sig, PL_csighandlerp);
     if (PL_sig_ignoring[sig]) return;
@@ -1329,6 +1332,9 @@
             exit(1);
 #endif
 #endif
+#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
+   va_start(args, sig);
+#endif
    if (
 #ifdef SIGILL
           sig == SIGILL ||
@@ -1345,6 +1351,9 @@
        (*PL_sighandlerp)(sig);
    else
        S_raise_signal(aTHX_ sig);
+#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
+   va_end(args);
+#endif
 }
 
 #if defined(FAKE_PERSISTENT_SIGNAL_HANDLERS) || 
defined(FAKE_DEFAULT_SIGNAL_HANDLERS)

==== //depot/perl/op.c#949 (text) ====
Index: perl/op.c
--- perl/op.c#948~31615~        2007-07-16 06:15:37.000000000 -0700
+++ perl/op.c   2007-08-30 06:49:14.000000000 -0700
@@ -3971,7 +3971,7 @@
        PL_modcount = 0;
        /* Grandfathering $[ assignment here.  Bletch.*/
        /* Only simple assignments like C<< ($[) = 1 >> are allowed */
-       PL_eval_start = (left->op_type == OP_CONST) ? right : 0;
+       PL_eval_start = (left->op_type == OP_CONST) ? right : NULL;
        left = mod(left, OP_AASSIGN);
        if (PL_eval_start)
            PL_eval_start = 0;

==== //depot/perl/pod/perlapi.pod#299 (text+w) ====
Index: perl/pod/perlapi.pod
--- perl/pod/perlapi.pod#298~31548~     2007-07-07 00:02:21.000000000 -0700
+++ perl/pod/perlapi.pod        2007-08-30 06:49:14.000000000 -0700
@@ -5167,11 +5167,11 @@
 
 Creates a new SV with its SvPVX_const pointing to a shared string in the string
 table. If the string does not already exist in the table, it is created
-first.  Turns on READONLY and FAKE.  The string's hash is stored in the UV
-slot of the SV; if the C<hash> parameter is non-zero, that value is used;
-otherwise the hash is computed.  The idea here is that as the string table
-is used for shared hash keys these strings will have SvPVX_const == HeKEY and
-hash lookup will avoid string compare.
+first.  Turns on READONLY and FAKE. If the C<hash> parameter is non-zero, that
+value is used; otherwise the hash is computed. The string's hash can be later
+be retrieved from the SV with the C<SvSHARED_HASH()> macro. The idea here is
+that as the string table is used for shared hash keys these strings will have
+SvPVX_const == HeKEY and hash lookup will avoid string compare.
 
        SV*     newSVpvn_share(const char* s, I32 len, U32 hash)
 

==== //depot/perl/pp.c#596 (text) ====
Index: perl/pp.c
--- perl/pp.c#595~31704~        2007-08-12 07:20:44.000000000 -0700
+++ perl/pp.c   2007-08-30 06:49:14.000000000 -0700
@@ -4066,7 +4066,7 @@
         }
 
         he = hv_fetch_ent(hv, keysv, lval, 0);
-        svp = he ? &HeVAL(he) : 0;
+        svp = he ? &HeVAL(he) : NULL;
 
         if (lval) {
             if (!svp || *svp == &PL_sv_undef) {

==== //depot/perl/pp_sys.c#544 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c#543~31730~    2007-08-18 00:59:56.000000000 -0700
+++ perl/pp_sys.c       2007-08-30 06:49:14.000000000 -0700
@@ -476,7 +476,7 @@
     }
     else {
        tmpsv = TOPs;
-        tmps = SvROK(tmpsv) ? NULL : SvPV_const(tmpsv, len);
+        tmps = SvROK(tmpsv) ? (const char *)NULL : SvPV_const(tmpsv, len);
     }
     if (!tmps || !len) {
        SV * const error = ERRSV;

==== //depot/perl/reentr.c#32 (text+w) ====
Index: perl/reentr.c
--- perl/reentr.c#31~29747~     2007-01-10 08:00:17.000000000 -0800
+++ perl/reentr.c       2007-08-30 06:49:14.000000000 -0700
@@ -313,6 +313,8 @@
 {
     dTHX;
     void *retptr = NULL;
+    va_list ap;
+    va_start(ap, f);
 #ifdef USE_REENTRANT_API
 #  if defined(USE_HOSTENT_BUFFER) || defined(USE_GRENT_BUFFER) || 
defined(USE_NETENT_BUFFER) || defined(USE_PWENT_BUFFER) || 
defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER)
     void *p0;
@@ -326,9 +328,6 @@
 #  if defined(USE_HOSTENT_BUFFER) || defined(USE_NETENT_BUFFER) || 
defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER)
     int anint;
 #  endif
-    va_list ap;
-
-    va_start(ap, f);
 
     switch (PL_op->op_type) {
 #ifdef USE_HOSTENT_BUFFER
@@ -531,11 +530,10 @@
        /* Not known how to retry, so just fail. */
        break;
     }
-
-    va_end(ap);
 #else
     PERL_UNUSED_ARG(f);
 #endif
+    va_end(ap);
     return retptr;
 }
 

==== //depot/perl/reentr.pl#53 (text) ====
Index: perl/reentr.pl
--- perl/reentr.pl#52~30235~    2007-02-12 10:25:07.000000000 -0800
+++ perl/reentr.pl      2007-08-30 06:49:14.000000000 -0700
@@ -856,6 +856,8 @@
 {
     dTHX;
     void *retptr = NULL;
+    va_list ap;
+    va_start(ap, f);
 #ifdef USE_REENTRANT_API
 #  if defined(USE_HOSTENT_BUFFER) || defined(USE_GRENT_BUFFER) || 
defined(USE_NETENT_BUFFER) || defined(USE_PWENT_BUFFER) || 
defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER)
     void *p0;
@@ -869,9 +871,6 @@
 #  if defined(USE_HOSTENT_BUFFER) || defined(USE_NETENT_BUFFER) || 
defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER)
     int anint;
 #  endif
-    va_list ap;
-
-    va_start(ap, f);
 
     switch (PL_op->op_type) {
 #ifdef USE_HOSTENT_BUFFER
@@ -1074,11 +1073,10 @@
        /* Not known how to retry, so just fail. */
        break;
     }
-
-    va_end(ap);
 #else
     PERL_UNUSED_ARG(f);
 #endif
+    va_end(ap);
     return retptr;
 }
 

==== //depot/perl/regexec.c#545 (text) ====
Index: perl/regexec.c
--- perl/regexec.c#544~31733~   2007-08-18 04:15:19.000000000 -0700
+++ perl/regexec.c      2007-08-30 06:49:14.000000000 -0700
@@ -5572,8 +5572,8 @@
             * documentation of these array elements. */
 
            si = *ary;
-           a  = SvROK(ary[1]) ? &ary[1] : 0;
-           b  = SvTYPE(ary[2]) == SVt_PVAV ? &ary[2] : 0;
+           a  = SvROK(ary[1]) ? &ary[1] : NULL;
+           b  = SvTYPE(ary[2]) == SVt_PVAV ? &ary[2] : NULL;
 
            if (a)
                sw = *a;

==== //depot/perl/sv.c#1419 (text) ====
Index: perl/sv.c
--- perl/sv.c#1418~31718~       2007-08-15 02:59:16.000000000 -0700
+++ perl/sv.c   2007-08-30 06:49:14.000000000 -0700
@@ -5397,7 +5397,7 @@
 
        if (PL_utf8cache) {
            STRLEN ulen;
-           MAGIC *mg = SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_utf8) : 0;
+           MAGIC *mg = SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_utf8) : NULL;
 
            if (mg && mg->mg_len != -1) {
                ulen = mg->mg_len;
End of Patch.

Reply via email to