This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix some 64-bit casts under DEBUG_LEAKING_SCALARS
authorDavid Mitchell <davem@iabyn.com>
Wed, 1 Sep 2010 11:52:32 +0000 (12:52 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 1 Sep 2010 11:52:32 +0000 (12:52 +0100)
sv.c
sv.h

diff --git a/sv.c b/sv.c
index 5c46460..cd40d77 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -12266,7 +12266,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
     PL_parser = NULL;
     Zero(&PL_debug_pad, 1, struct perl_debug_pad);
 #  ifdef DEBUG_LEAKING_SCALARS
-    PL_sv_serial = (((U32)my_perl >> 2) & 0xfff) * 1000000;
+    PL_sv_serial = (((UV)my_perl >> 2) & 0xfff) * 1000000;
 #  endif
 #else  /* !DEBUGGING */
     Zero(my_perl, 1, PerlInterpreter);
diff --git a/sv.h b/sv.h
index 5819ee4..a96c6f5 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -117,7 +117,7 @@ struct STRUCT_SV {          /* struct sv { */
     PERL_BITFIELD32 sv_debug_optype:9; /* the type of OP that allocated us */
     PERL_BITFIELD32 sv_debug_inpad:1;  /* was allocated in a pad for an OP */
     PERL_BITFIELD32 sv_debug_line:16;  /* the line where we were allocated */
-    U32                    sv_debug_serial;    /* serial number of sv allocation   */
+    UV             sv_debug_serial;    /* serial number of sv allocation   */
     char *         sv_debug_file;      /* the file where we were allocated */
     SV *           sv_debug_parent;    /* what we were cloned from (ithreads)*/
 #endif