diff options
author | Geoff Thorpe <geoff@openssl.org> | 2001-01-09 00:24:38 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2001-01-09 00:24:38 +0000 |
commit | 3c914840520161d9ca121d38973a79b050916a8a (patch) | |
tree | 54e55c6caf32e0ec88ac04b6a7765f7452fc7739 /crypto/objects/o_names.c | |
parent | 98d517c5dad7812f2df30f001356eb4cfa7fa6fc (diff) |
Move all the existing function pointer casts associated with LHASH's two
"doall" functions to using type-safe wrappers. As and where required, this
can be replaced by redeclaring the underlying callbacks to use the
underlying "void"-based prototypes (eg. if performance suffers from an
extra level of function invocation).
Diffstat (limited to 'crypto/objects/o_names.c')
-rw-r--r-- | crypto/objects/o_names.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/objects/o_names.c b/crypto/objects/o_names.c index 87ea624f2e..03d65397b8 100644 --- a/crypto/objects/o_names.c +++ b/crypto/objects/o_names.c @@ -248,6 +248,8 @@ static void do_all_fn(const OBJ_NAME *name,struct doall *d) d->fn(name,d->arg); } +static IMPLEMENT_LHASH_DOALL_ARG_FN(do_all_fn, const OBJ_NAME *, struct doall *) + void OBJ_NAME_do_all(int type,void (*fn)(const OBJ_NAME *,void *arg),void *arg) { struct doall d; @@ -256,7 +258,7 @@ void OBJ_NAME_do_all(int type,void (*fn)(const OBJ_NAME *,void *arg),void *arg) d.fn=fn; d.arg=arg; - lh_doall_arg(names_lh,(LHASH_DOALL_ARG_FN_TYPE)do_all_fn,&d); + lh_doall_arg(names_lh,LHASH_DOALL_ARG_FN(do_all_fn),&d); } struct doall_sorted @@ -316,6 +318,8 @@ static void names_lh_free(OBJ_NAME *onp) } } +static IMPLEMENT_LHASH_DOALL_FN(names_lh_free, OBJ_NAME *) + static void name_funcs_free(NAME_FUNCS *ptr) { OPENSSL_free(ptr); @@ -331,7 +335,7 @@ void OBJ_NAME_cleanup(int type) down_load=names_lh->down_load; names_lh->down_load=0; - lh_doall(names_lh,(LHASH_DOALL_FN_TYPE)names_lh_free); + lh_doall(names_lh,LHASH_DOALL_FN(names_lh_free)); if (type < 0) { lh_free(names_lh); |