]> granicus.if.org Git - gc/commitdiff
Remove unused 'destructor' parameter in 'specific' GC_key_create
authorIvan Maidanski <ivmai@mail.ru>
Wed, 16 Nov 2011 15:57:17 +0000 (19:57 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 16 Nov 2011 15:57:17 +0000 (19:57 +0400)
function (add '_inner' suffix to the function name and create
GC_key_create proxy macro)

* include/private/specific.h (GC_key_create): Rename to
GC_key_create_inner; remove "destructor" parameter.
* specific.c (GC_key_create): Likewise.
* include/private/specific.h (GC_key_create): New macro redirecting
to GC_key_create_inner function.

include/private/specific.h
specific.c

index e6b1cd23574845b6ee206d359d70434462187eb1..3a73a0fba70c5bfb2d7681b2af249a4813e6f43a 100644 (file)
@@ -66,7 +66,8 @@ typedef struct thread_specific_data {
 
 typedef tsd * GC_key_t;
 
-GC_INNER int GC_key_create(tsd ** key_ptr, void (* destructor)(void *));
+#define GC_key_create(key, d) GC_key_create_inner(key)
+GC_INNER int GC_key_create_inner(tsd ** key_ptr);
 GC_INNER int GC_setspecific(tsd * key, void * value);
 GC_INNER void GC_remove_specific(tsd * key);
 
index 2f6facf76f329ff13d022cfd83a7c0ab39bb8e7f..bc35d6620a4976c5d252652f26b619deb59e63cf 100644 (file)
@@ -26,7 +26,7 @@ static tse invalid_tse = {INVALID_QTID, 0, 0, INVALID_THREADID};
             /* appear valid to a reader.  Used to fill in empty */
             /* cache entries to avoid a check for 0.            */
 
-GC_INNER int GC_key_create(tsd ** key_ptr, void (* destructor)(void *))
+GC_INNER int GC_key_create_inner(tsd ** key_ptr)
 {
     int i;
     tsd * result = (tsd *)MALLOC_CLEAR(sizeof(tsd));