Changeset 39023 in project


Ignore:
Timestamp:
09/12/20 14:14:14 (12 days ago)
Author:
felix winkelmann
Message:

heap-o-rama 0.2: proper unsigned integer declarations, as reported by alaricsp

Location:
release/4/heap-o-rama
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/heap-o-rama/tags/0.2/heap-o-rama.setup

    r19160 r39023  
    11;;;; heap-o-rama.setup -*- Scheme -*-
    22
    3 (standard-extension 'heap-o-rama 0.1 #f)
     3(standard-extension 'heap-o-rama 0.2 #f)
  • release/4/heap-o-rama/tags/0.2/low-level-stuff.c

    r19368 r39023  
    66
    77static int min_size = 1, max_size = 100;
    8 static int hash_table_size = 0;
     8static unsigned int hash_table_size = 0;
    99static C_word *hash_table = NULL;
    1010static int gc_happened = 0;
     
    3939{
    4040  unsigned long n = (unsigned long)x;
    41   int k = (n & 0xffff) ^ (n >> 16);
    42   int index = (k % hash_table_size) * 2;
     41  unsigned int k = (n & 0xffff) ^ (n >> 16);
     42  unsigned int index = (k % hash_table_size) * 2;
    4343  int max_tries = 100;
    4444
     
    6060{
    6161  int i;
    62   int hlen = len * 2;
     62  unsigned int hlen = len * 2;
    6363
    6464  if(hash_table_size != hlen) {
  • release/4/heap-o-rama/trunk/low-level-stuff.c

    r19368 r39023  
    66
    77static int min_size = 1, max_size = 100;
    8 static int hash_table_size = 0;
     8static unsigned int hash_table_size = 0;
    99static C_word *hash_table = NULL;
    1010static int gc_happened = 0;
     
    3939{
    4040  unsigned long n = (unsigned long)x;
    41   int k = (n & 0xffff) ^ (n >> 16);
    42   int index = (k % hash_table_size) * 2;
     41  unsigned int k = (n & 0xffff) ^ (n >> 16);
     42  unsigned int index = (k % hash_table_size) * 2;
    4343  int max_tries = 100;
    4444
     
    6060{
    6161  int i;
    62   int hlen = len * 2;
     62  unsigned int hlen = len * 2;
    6363
    6464  if(hash_table_size != hlen) {
Note: See TracChangeset for help on using the changeset viewer.