]> granicus.if.org Git - gc/commitdiff
Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
authorIvan Maidanski <ivmai@mail.ru>
Thu, 1 Mar 2018 19:47:22 +0000 (22:47 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 4 Mar 2018 11:45:20 +0000 (14:45 +0300)
* include/new_gc_alloc.h (GC_generic_malloc_words_small): Replace
prototype with a macro (that uses GC_generic_malloc); remove FIXME item.

include/new_gc_alloc.h

index 3971c303070aa2654172289af3da980b8191926f..a3a51a79c6794d8985071e5136c295d0be077279 100644 (file)
@@ -85,11 +85,11 @@ extern "C" {
 
     GC_API void GC_CALL GC_incr_bytes_allocd(size_t bytes);
     GC_API void GC_CALL GC_incr_bytes_freed(size_t bytes);
-
-    GC_API char * GC_CALL GC_generic_malloc_words_small(size_t word, int kind);
-                /* FIXME: Doesn't exist anymore.        */
 }
 
+#define GC_generic_malloc_words_small(lw, k) \
+                        GC_generic_malloc((lw) * sizeof(GC_word), k)
+
 // Object kinds; must match PTRFREE, NORMAL, UNCOLLECTABLE, and
 // AUNCOLLECTABLE in gc_priv.h.