forked from pool/guile1
Petr Gajdos
ee09a12a26
OBS-URL: https://build.opensuse.org/package/show/devel:languages:misc/guile1?expand=0&rev=1
36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
Index: libguile/hash.c
|
|
===================================================================
|
|
--- libguile/hash.c.orig 2010-12-13 19:24:40.000000000 +0200
|
|
+++ libguile/hash.c 2011-09-27 19:28:16.762890910 +0200
|
|
@@ -169,7 +169,7 @@ scm_hasher(SCM obj, unsigned long n, siz
|
|
unsigned long
|
|
scm_ihashq (SCM obj, unsigned long n)
|
|
{
|
|
- return (SCM_UNPACK (obj) >> 1) % n;
|
|
+ return ((unsigned long) SCM_UNPACK (obj) >> 1) % n;
|
|
}
|
|
|
|
|
|
@@ -205,7 +205,7 @@ scm_ihashv (SCM obj, unsigned long n)
|
|
if (SCM_NUMP(obj))
|
|
return (unsigned long) scm_hasher(obj, n, 10);
|
|
else
|
|
- return SCM_UNPACK (obj) % n;
|
|
+ return (unsigned long) SCM_UNPACK (obj) % n;
|
|
}
|
|
|
|
|
|
Index: libguile/struct.c
|
|
===================================================================
|
|
--- libguile/struct.c.orig 2010-12-13 19:24:40.000000000 +0200
|
|
+++ libguile/struct.c 2011-09-27 19:28:16.769890717 +0200
|
|
@@ -825,7 +825,7 @@ scm_struct_ihashq (SCM obj, unsigned lon
|
|
{
|
|
/* The length of the hash table should be a relative prime it's not
|
|
necessary to shift down the address. */
|
|
- return SCM_UNPACK (obj) % n;
|
|
+ return (unsigned long) SCM_UNPACK (obj) % n;
|
|
}
|
|
|
|
SCM
|