From 35a99b6380231992457f9e4133d3c3e509b85d0d Mon Sep 17 00:00:00 2001 From: Geoff Thorpe Date: Sat, 2 Dec 2000 23:16:54 +0000 Subject: Use the new LHASH macros to declare type-safe wrapper functions that can be used as the hash/compare callbacks without function pointer casting. For now, this is just happening in the apps/ directory whilst a few people check the approach. The rest of the library will be moved across to the same idea if there's no problems with this. --- apps/openssl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'apps/openssl.c') diff --git a/apps/openssl.c b/apps/openssl.c index 40bcb76341..49d0b2bd1f 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -85,6 +85,9 @@ char *default_config_file=NULL; BIO *bio_err=NULL; #endif +static IMPLEMENT_LHASH_HASH_FN(hash,FUNCTION *); +static IMPLEMENT_LHASH_COMP_FN(cmp,FUNCTION *); + int main(int Argc, char *Argv[]) { ARGS arg; @@ -351,8 +354,8 @@ static LHASH *prog_init(void) ; qsort(functions,i,sizeof *functions,SortFnByName); - if ((ret=lh_new((LHASH_HASH_FN_TYPE)hash, - (LHASH_COMP_FN_TYPE)cmp)) == NULL) + if ((ret=lh_new(LHASH_HASH_FN(hash), + LHASH_COMP_FN(cmp))) == NULL) return(NULL); for (f=functions; f->name != NULL; f++) -- cgit v1.2.3