X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Flhash%2Flhash.h;h=d315fd9c6d7c482017c5870d749d99d40a645917;hp=06aad873b29f85f1370a7c64ea4dd84bf5048b40;hb=6e22639f4640b702d9d8636265c685448ca64145;hpb=dfeab0689f69c0b4bd3480ffd37a9cacc2f17d9c diff --git a/crypto/lhash/lhash.h b/crypto/lhash/lhash.h index 06aad873b2..d315fd9c6d 100644 --- a/crypto/lhash/lhash.h +++ b/crypto/lhash/lhash.h @@ -67,9 +67,13 @@ extern "C" { #endif +#ifndef NO_FP_API +#include +#endif + typedef struct lhash_node_st { - char *data; + void *data; struct lhash_node_st *next; #ifndef NO_HASH_COMP unsigned long hash; @@ -112,15 +116,15 @@ typedef struct lhash_st * in lh_insert(). */ #define lh_error(lh) ((lh)->error) -#ifndef NOPROTO -LHASH *lh_new(unsigned long (*h)(), int (*c)()); +LHASH *lh_new(unsigned long (*h)(/* void *a */), int (*c)(/* void *a,void *b */)); void lh_free(LHASH *lh); -char *lh_insert(LHASH *lh, char *data); -char *lh_delete(LHASH *lh, char *data); -char *lh_retrieve(LHASH *lh, char *data); -void lh_doall(LHASH *lh, void (*func)(/* char *b */)); -void lh_doall_arg(LHASH *lh, void (*func)(/*char *a,char *b*/),char *arg); -unsigned long lh_strhash(char *c); +void *lh_insert(LHASH *lh, void *data); +void *lh_delete(LHASH *lh, void *data); +void *lh_retrieve(LHASH *lh, void *data); + void lh_doall(LHASH *lh, void (*func)(/*void *b*/)); +void lh_doall_arg(LHASH *lh, void (*func)(/*void *a,void *b*/),void *arg); +unsigned long lh_strhash(const char *c); +unsigned long lh_num_items(LHASH *lh); #ifndef NO_FP_API void lh_stats(LHASH *lh, FILE *out); @@ -133,26 +137,6 @@ void lh_stats_bio(LHASH *lh, BIO *out); void lh_node_stats_bio(LHASH *lh, BIO *out); void lh_node_usage_stats_bio(LHASH *lh, BIO *out); #endif -#else -LHASH *lh_new(); -void lh_free(); -char *lh_insert(); -char *lh_delete(); -char *lh_retrieve(); -void lh_doall(); -void lh_doall_arg(); -unsigned long lh_strhash(); - -#ifndef NO_FP_API -void lh_stats(); -void lh_node_stats(); -void lh_node_usage_stats(); -#endif -void lh_stats_bio(); -void lh_node_stats_bio(); -void lh_node_usage_stats_bio(); -#endif - #ifdef __cplusplus } #endif