develooper Front page | perl.perl5.porters | Postings from April 2003

[PATCH] RE: perl@19333

Thread Next
From:
Robin Barker
Date:
April 29, 2003 09:30
Subject:
[PATCH] RE: perl@19333
Message ID:
533D273D4014D411AB1D00062938C4D9040464F7@hotel.npl.co.uk
Jarkko

Patch appended and attached: just a few format and int2ptr fixes.

One format problem was that the format checking code was broken!

Robin

--- embed.pl.orig	Tue Apr 29 12:57:55 2003
+++ embed.pl
@@ -184,7 +184,7 @@
 	    my $prefix = $flags =~ /n/ ? '' : 'pTHX_';
 	    my $args = scalar @args;
 	    $ret .= "\n#ifdef CHECK_FORMAT\n";
-	    $ret .= sprintf "
__attribute__((format(printf,%s%d,%s%d)))",
+	    $ret .= sprintf "
__attribute__((format(__printf__,%s%d,%s%d)))",
 				    $prefix, $args - 1, $prefix, $args;
 	    $ret .= "\n#endif\n";
 	}
--- pp_hot.c.orig	Thu Apr 24 07:16:25 2003
+++ pp_hot.c
@@ -3063,7 +3063,7 @@
           HE* he;
 	  he = hv_fetch_ent(PL_stashcache, sv, 0, 0);
           if (he) { 
-            stash = (HV*)SvIV(HeVAL(he));
+            stash = INT2PTR(HV*,SvIV(HeVAL(he)));
             goto fetch;
           }
         }
@@ -3089,7 +3089,7 @@
 	    if (!stash)
 		packsv = sv;
             else {
-	        SV* ref = newSViv((IV)stash);
+	        SV* ref = newSViv(PTR2IV(stash));
 	        hv_store(PL_stashcache, packname, packlen, ref, 0);
 	    }
 	    goto fetch;
--- pp_pack.c.orig	Tue Apr  8 15:31:05 2003
+++ pp_pack.c
@@ -417,7 +417,7 @@
         if (strchr(natstr, code))
  	  code |= TYPE_IS_SHRIEKING;
         else
-   	  Perl_croak(aTHX_ "'!' allowed only after types %s in
pack/unpack",
+   	  Perl_croak(aTHX_ "'!' allowed only after types %s in %s",
                      natstr, symptr->flags & FLAG_PACK ? "pack" :
"unpack" );
       }
 
End of patch



-------------------------------------------------------------------
This e-mail and any attachments may contain confidential and/or
privileged material; it is for the intended addressee(s) only.
If you are not a named addressee, you must not use, retain or
disclose such information.

NPL Management Ltd cannot guarantee that the e-mail or any
attachments are free from viruses.

NPL Management Ltd. Registered in England and Wales. No: 2937881
Registered Office: Teddington, Middlesex, United Kingdom TW11 0LW.
-------------------------------------------------------------------
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About