From 9bb98a4e50c4c3a13a384baf9e784cae81a592e3 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 9 Aug 2019 14:24:20 +0200 Subject: erts: Add typedef for hash_foreach function ptr --- erts/emulator/beam/hash.c | 2 +- erts/emulator/beam/hash.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'erts') diff --git a/erts/emulator/beam/hash.c b/erts/emulator/beam/hash.c index 8954dbb06c..cc816ac163 100644 --- a/erts/emulator/beam/hash.c +++ b/erts/emulator/beam/hash.c @@ -343,7 +343,7 @@ hash_remove(Hash *h, void *tmpl) return NULL; } -void hash_foreach(Hash* h, void (*func)(void *, void *), void *func_arg2) +void hash_foreach(Hash* h, HFOREACH_FUN func, void *func_arg2) { int i; diff --git a/erts/emulator/beam/hash.h b/erts/emulator/beam/hash.h index d319aaca83..38b401548a 100644 --- a/erts/emulator/beam/hash.h +++ b/erts/emulator/beam/hash.h @@ -38,6 +38,7 @@ typedef void (*HFREE_FUN)(void*); typedef void* (*HMALLOC_FUN)(int,size_t); typedef void (*HMFREE_FUN)(int,void*); typedef int (*HMPRINT_FUN)(fmtfn_t,void*,char*, ...); +typedef void (*HFOREACH_FUN)(void *, void *); /* ** This bucket must be placed in top of @@ -96,6 +97,6 @@ void* hash_get(Hash*, void*); void* hash_put(Hash*, void*); void* hash_erase(Hash*, void*); void* hash_remove(Hash*, void*); -void hash_foreach(Hash*, void (*func)(void *, void *), void *); +void hash_foreach(Hash*, HFOREACH_FUN, void *); #endif -- cgit v1.2.3