X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Flhash%2Flhash.h;h=e7d87635911af99f0472c3a7fd60e1310230b296;hb=dfcf48f499f19fd17a3aee03151ea301814ea6ec;hp=29afe002de66f718ccfad9ebf576eb7b44bac299;hpb=3c1d6bbc9242900af0e5db927fdcda38539bd54a;p=oweals%2Fopenssl.git diff --git a/crypto/lhash/lhash.h b/crypto/lhash/lhash.h index 29afe002de..e7d8763591 100644 --- a/crypto/lhash/lhash.h +++ b/crypto/lhash/lhash.h @@ -194,16 +194,16 @@ void lh_node_stats_bio(const _LHASH *lh, BIO *out); void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out); #endif -// Type checking... +/* Type checking... */ #define LHASH_OF(type) struct lhash_st_##type -#define DECLARE_LHASH_OF(type) LHASH_OF(type) { } +#define DECLARE_LHASH_OF(type) LHASH_OF(type) { int dummy; } #define CHECKED_LHASH_OF(type,lh) \ ((_LHASH *)CHECKED_PTR_OF(LHASH_OF(type),lh)) -// Define wrapper functions. +/* Define wrapper functions. */ #define LHM_lh_new(type, name) \ ((LHASH_OF(type) *)lh_new(LHASH_HASH_FN(name), LHASH_COMP_FN(name))) #define LHM_lh_error(type, lh) \ @@ -230,25 +230,8 @@ void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out); lh_stats_bio(CHECKED_LHASH_OF(type, lh), out) #define LHM_lh_free(type, lh) lh_free(CHECKED_LHASH_OF(type, lh)) - -/* Strings are special: normally an lhash entry will point to a single - * (somewhat) mutable object. In the case of strings: - * - * a) Instead of a single char, there is an array of chars, NUL-terminated. - * b) The string may have be immutable. - * - * So, they need their own declarations. Especially important for - * type-checking tools, such as Deputy. - * - * In practice, however, it appears to be hard to have a const - * string. For now, I'm settling for dealing with the fact it is a - * string at all. - */ -typedef char *STRING; -DECLARE_LHASH_OF(STRING); - -typedef const char *CSTRING; -DECLARE_LHASH_OF(CSTRING); +DECLARE_LHASH_OF(OPENSSL_STRING); +DECLARE_LHASH_OF(OPENSSL_CSTRING); #ifdef __cplusplus }