(scm_gc_free): Don't call `free' if mem is NULL.
** Avoid MacOS build problems caused by incorrect combination of "64"
system and library calls.
** Fixed compilation of `numbers.c' with Sun Studio (Solaris 9)
+** Fixed wrong-type-arg errors when creating zero length SRFI-4
+uniform vectors on AIX.
* New modules (see the manual for details)
Alex Shinn
Daniel Skarda
Cesar Strauss
+ Rainer Tammer
Richard Todd
Issac Trotts
Greg Troxel
+2008-02-06 Neil Jerram <neil@ossau.uklinux.net>
+
+ * gc-malloc.c (scm_gc_malloc): Return NULL if requested size is 0.
+ (scm_gc_free): Don't call `free' if mem is NULL.
+
2008-02-06 Ludovic Courtès <ludo@gnu.org>
* numbers.c (scm_i_mkbig, scm_i_long2big, scm_i_ulong2big,
to write it the program is killed with signal 11. --hwn
*/
- void *ptr = scm_malloc (size);
+ void *ptr = size ? scm_malloc (size) : NULL;
scm_gc_register_collectable_memory (ptr, size, what);
return ptr;
}
scm_gc_free (void *mem, size_t size, const char *what)
{
scm_gc_unregister_collectable_memory (mem, size, what);
- free (mem);
+ if (mem)
+ free (mem);
}
char *