[Commit] nickle ChangeLog, 1.20, 1.21 integer.c, 1.18, 1.19 mem.c, 1.16, 1.17

Keith Packard commit at keithp.com
Thu Apr 1 23:06:19 PST 2004


Committed by: keithp

Update of /local/src/CVS/nickle
In directory home.keithp.com:/tmp/cvs-serv19722

Modified Files:
	ChangeLog integer.c mem.c 
Log Message:
2004-04-01  Keith Packard  <keithp at keithp.com>

	* debian/changelog:
	Update to 2.29-1
	* integer.c: (NewInteger):
	* mem.c: (MemReference), (MemReferenceNoRecurse):
	More pointer casting magic for gcc on ia64


Index: ChangeLog
===================================================================
RCS file: /local/src/CVS/nickle/ChangeLog,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- a/ChangeLog	1 Apr 2004 22:06:01 -0000	1.20
+++ b/ChangeLog	2 Apr 2004 07:06:17 -0000	1.21
@@ -1,5 +1,13 @@
 2004-04-01  Keith Packard  <keithp at keithp.com>
 
+	* debian/changelog:
+	Update to 2.29-1
+	* integer.c: (NewInteger):
+	* mem.c: (MemReference), (MemReferenceNoRecurse):
+	More pointer casting magic for gcc on ia64
+
+2004-04-01  Keith Packard  <keithp at keithp.com>
+
 	* gcd.c: (NaturalRslInplace), (NaturalBdivmodInplace):
 	Ouch.  NaturalRslInplace was not checking argument
 	for zero

Index: integer.c
===================================================================
RCS file: /local/src/CVS/nickle/integer.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- a/integer.c	27 Feb 2004 03:50:16 -0000	1.18
+++ b/integer.c	2 Apr 2004 07:06:17 -0000	1.19
@@ -430,7 +430,7 @@
 NewInteger (Sign sign, Natural *mag)
 {
     ENTER ();
-    unsigned	c = ((unsigned) mag ^ (unsigned) sign) % INTEGER_CACHE_SIZE;
+    unsigned	c = (PtrToUInt(mag) ^ (unsigned) sign) % INTEGER_CACHE_SIZE;
     Value	*re = (Value *) DataCacheValues(integerCache) + c;
     Value	ret = *re;
 

Index: mem.c
===================================================================
RCS file: /local/src/CVS/nickle/mem.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- a/mem.c	27 Feb 2004 03:50:16 -0000	1.16
+++ b/mem.c	2 Apr 2004 07:06:17 -0000	1.17
@@ -48,6 +48,13 @@
 #include	"memp.h"
 #include	<stdlib.h>
 
+#if HAVE_STDINT_H
+#include	<stdint.h>
+#define PtrToInt(p)	((int) (intptr_t) (p))
+#else
+#define PtrToInt(p)	((int) (p))
+#endif
+
 static void	noteBlock (struct block *);
 static void	checkBlockRef (struct block *);
 #ifdef DEBUG
@@ -594,7 +601,7 @@
 
     if (!object)
 	return;
-    if (((int) object) & 3)
+    if (PtrToInt(object) & 3)
 	return;
     if (!setReference (object))
     {
@@ -609,7 +616,7 @@
 {
     if (!object)
 	return 1;
-    if (((int) object) & 3)
+    if (PtrToInt (object) & 3)
 	return 1;
     return setReference (object);
 }




More information about the Commit mailing list