X-Git-Url: http://git.hcoop.net/bpt/guile.git/blobdiff_plain/f0007cade095c5a2878ebbb8ea8c9b40810e4509..4bfe73072b75259a97a9daa81ed5c9c01e8a4af5:/lib/malloca.c diff --git a/lib/malloca.c b/lib/malloca.c index eca55980e..2d4c47972 100644 --- a/lib/malloca.c +++ b/lib/malloca.c @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ #define _GL_USE_STDLIB_ALLOC 1 #include @@ -22,6 +21,8 @@ /* Specification. */ #include "malloca.h" +#include + #include "verify.h" /* The speed critical point in this file is freea() applied to an alloca() @@ -85,7 +86,7 @@ mmalloca (size_t n) ((int *) p)[-1] = MAGIC_NUMBER; /* Enter p into the hash table. */ - slot = (unsigned long) p % HASH_TABLE_SIZE; + slot = (uintptr_t) p % HASH_TABLE_SIZE; ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot]; mmalloca_results[slot] = p; @@ -118,7 +119,7 @@ freea (void *p) { /* Looks like a mmalloca() result. To see whether it really is one, perform a lookup in the hash table. */ - size_t slot = (unsigned long) p % HASH_TABLE_SIZE; + size_t slot = (uintptr_t) p % HASH_TABLE_SIZE; void **chain = &mmalloca_results[slot]; for (; *chain != NULL;) {