threads::shared 1.24 (still more)
authorJerry D. Hedden <jdhedden@cpan.org>
Thu, 10 Jul 2008 10:29:14 +0000 (06:29 -0400)
committerSteve Hay <SteveHay@planit.com>
Thu, 10 Jul 2008 14:45:27 +0000 (14:45 +0000)
From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <1ff86f510807100729k4b620d3dl3fa079b89360f5ee@mail.gmail.com>

Fixes warnings introduced by previous patch.

p4raw-id: //depot/perl@34118

ext/threads/shared/shared.xs

index 50f70af..b9a3241 100644 (file)
@@ -876,7 +876,9 @@ sharedsv_elem_mg_FETCH(pTHX_ SV *sv, MAGIC *mg)
         I32 len = mg->mg_len;
         assert ( mg->mg_ptr != 0 );
         if (mg->mg_len == HEf_SVKEY) {
-            key = SvPV((SV *)mg->mg_ptr, len);
+            STRLEN slen;
+            key = SvPV((SV *)mg->mg_ptr, slen);
+            len = slen;
             if (SvUTF8((SV *)mg->mg_ptr)) {
                 len = -len;
             }
@@ -930,7 +932,9 @@ sharedsv_elem_mg_STORE(pTHX_ SV *sv, MAGIC *mg)
         I32 len = mg->mg_len;
         assert ( mg->mg_ptr != 0 );
         if (mg->mg_len == HEf_SVKEY) {
-            key = SvPV((SV *)mg->mg_ptr, len);
+            STRLEN slen;
+            key = SvPV((SV *)mg->mg_ptr, slen);
+            len = slen;
             if (SvUTF8((SV *)mg->mg_ptr)) {
                 len = -len;
             }
@@ -965,7 +969,9 @@ sharedsv_elem_mg_DELETE(pTHX_ SV *sv, MAGIC *mg)
         I32 len = mg->mg_len;
         assert ( mg->mg_ptr != 0 );
         if (mg->mg_len == HEf_SVKEY) {
-            key = SvPV((SV *)mg->mg_ptr, len);
+            STRLEN slen;
+            key = SvPV((SV *)mg->mg_ptr, slen);
+            len = slen;
             if (SvUTF8((SV *)mg->mg_ptr)) {
                 len = -len;
             }
@@ -1287,7 +1293,9 @@ EXISTS(SV *obj, SV *index)
             exists = av_exists((AV*) sobj, SvIV(index));
         } else {
             I32 len;
-            char *key = SvPVutf8(index, len);
+            STRLEN slen;
+            char *key = SvPVutf8(index, slen);
+            len = slen;
             if (SvUTF8(index)) {
                 len = -len;
             }