From: Abhijit Menon-Sen <ams@wiw.org>
Date: Mon, 23 May 2005 16:58:46 +0000 (+0000)
Subject: Assorted 2.15 fixes.
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0bb78401313e0347fd894143d813c3036c2eccb4;p=p5sagit%2Fp5-mst-13.2.git

Assorted 2.15 fixes.

p4raw-id: //depot/perl@24556
---

diff --git a/ext/Storable/ChangeLog b/ext/Storable/ChangeLog
index 64b2f84..a182162 100644
--- a/ext/Storable/ChangeLog
+++ b/ext/Storable/ChangeLog
@@ -1,3 +1,9 @@
+Mon May 23 22:48:49 IST 2005   Abhijit Menon-Sen <ams@wiw.org>
+
+    Version 2.15
+
+        Minor changes to address a couple of compile problems.
+
 Mon Apr 25 07:29:14 IST 2005   Abhijit Menon-Sen <ams@wiw.org>
 
     Version 2.14
diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs
index b4ff829..e5db8f6 100644
--- a/ext/Storable/Storable.xs
+++ b/ext/Storable/Storable.xs
@@ -86,6 +86,13 @@ typedef double NV;			/* Older perls lack the NV type */
 #endif
 #endif
 
+#ifndef SvRV_set
+#define SvRV_set(sv, val) \
+    STMT_START { \
+        assert(SvTYPE(sv) >=  SVt_RV); \
+        (((XRV*)SvANY(sv))->xrv_rv = (val)); \
+    } STMT_END
+#endif
 
 #ifndef PERL_UNUSED_DECL
 #  ifdef HASATTRIBUTE
@@ -108,10 +115,10 @@ typedef double NV;			/* Older perls lack the NV type */
 #endif
 
 #ifndef HvRITER_set
-#  define HvRITER_set(hv,r)	(*HvRITER(hv) = r)
+#  define HvRITER_set(hv,r)	(HvRITER(hv) = r)
 #endif
 #ifndef HvEITER_set
-#  define HvEITER_set(hv,r)	(*HvEITER(hv) = r)
+#  define HvEITER_set(hv,r)	(HvEITER(hv) = r)
 #endif
 
 #ifndef HvRITER_get
@@ -2460,7 +2467,7 @@ static int store_hash(pTHX_ stcxt_t *cxt, HV *hv)
 		 */
   
 		for (i = 0; i < len; i++) {
-			char *key;
+			char *key = 0;
 			I32 len;
                         unsigned char flags;
 #ifdef HV_ITERNEXT_WANTPLACEHOLDERS
@@ -3017,7 +3024,7 @@ static int store_hook(
 		   failure, whereas the existing code assumes that it can
 		   safely store a tag zero. So for ptr_tables we store tag+1
 		*/
-		if (fake_tag = ptr_table_fetch(cxt->pseen, xsv))
+		if ((fake_tag = ptr_table_fetch(cxt->pseen, xsv)))
 			goto sv_seen;		/* Avoid moving code too far to the right */
 #else
 		if ((svh = hv_fetch(cxt->hseen, (char *) &xsv, sizeof(xsv), FALSE)))