summaryrefslogtreecommitdiffstats
path: root/crypto/lhash/lhash.h
AgeCommit message (Collapse)Author
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2009-07-27Change STRING to OPENSSL_STRING etc as common words suchDr. Stephen Henson
as "STRING" cause conflicts with other headers/libraries.
2008-06-04More type-checking.Ben Laurie
2008-05-27Avoid warning about empty structures and always define CHECKED_PTR_OFDr. Stephen Henson
2008-05-26C++ style comments fixed.Dr. Stephen Henson
2008-05-26LHASH revamp. make depend.Ben Laurie
2003-10-29Relax some over-zealous constification that gave some lhash-based code noGeoff Thorpe
choice but to have to cast away "const" qualifiers from their prototypes. This does not remove constification restrictions from hash/compare callbacks, but allows destructor commands to be run over a tables' elements without bad casts.
2003-03-20Make sure we get the definition of OPENSSL_NO_FP_API.Richard Levitte
2001-07-08Correct const-ness.Ben Laurie
2001-02-19Make all configuration macros available for application by makingRichard Levitte
sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
2001-01-09oops, void functions shouldn't try and return a value. Strangely, gccGeoff Thorpe
didn't even give a warning for this yet HPUX cc considered it an error. Reported by Lutz(@openssl.org).
2001-01-09This adds macros to implement (and/or declare) type-safe wrapper functionsGeoff Thorpe
around the callbacks required in the LHASH code for the "doall" functions. Also - fix the evil function pointer casting in the two lh_doall functions by deferring to a static utility function. Previously lh_doall() was invoking lh_doall_arg() by casting the callback to the 2-parameter prototype and passing in a NULL argument. This appears to have been working thus far but it's not a hot idea. If the extra level of indirection becomes a performance hit, we can just provide two virtually identical implementations for each variant later on.
2000-12-13Constification of the data of a hash table. This means the callbackRichard Levitte
functions need to be constified, and therefore meant a number of easy changes a little everywhere. Now, if someone could explain to me why OBJ_dup() cheats...
2000-12-04ANSI C doesn't allow trailing semi-colons after a function's closing braceGeoff Thorpe
so these macros probably shouldn't be used like that at all. So, this change removes the misleading comment and also adds an implicit trailing semi-colon to the DECLARE macros so they too don't require one.
2000-12-02Next step in tidying up the LHASH code. This commit defines DECLARE andGeoff Thorpe
IMPLEMENT macros for defining wrapper functions for "hash" and "cmp" callbacks that are specific to the underlying item type in a hash-table. This prevents function pointer casting altogether, and also provides some type-safety because the macro does per-variable casting from the (void *) type used in LHASH itself to the type declared in the macro - and if that doesn't match the prototype expected by the "hash" or "cmp" function then a compiler error will result. NB: IMPLEMENT macros are not required unless predeclared forms are required (either in a header file, or further up in a C file than the implementation needs to be). The DECLARE macros must occur after the type-specific hash/cmp callbacks are declared. Also, the IMPLEMENT and DECLARE macros are such that they can be prefixed with "static" if desired and a trailing semi-colon should be appended (making it look more like a regular declaration and easier on auto-formatting text-editors too). Now that these macros are defined, I will next be commiting changes to a number of places in the library where the casting was doing bad things. After that, the final step will be to make the analogous changes for the lh_doall and lh_doall_arg functions (more specifically, their callback parameters).
2000-12-01First step in tidying up the LHASH code. The callback prototypes (andGeoff Thorpe
casts) used in the lhash code are about as horrible and evil as they can be. For starters, the callback prototypes contain empty parameter lists. Yuck. This first change defines clearer prototypes - including "typedef"'d function pointer types to use as "hash" and "compare" callbacks, as well as the callbacks passed to the lh_doall and lh_doall_arg iteration functions. Now at least more explicit (and clear) casting is required in all of the dependant code - and that should be included in this commit. The next step will be to hunt down and obliterate some of the function pointer casting being used when it's not necessary - a particularly evil variant exists in the implementation of lh_doall.
2000-11-07Constification of LHASH. Contributed by "Paul D. Smith" <psmith@gnu.org>Richard Levitte
I didn't apply all his patches yet, since I have some hesitance about unconstifying. To be pondered.
2000-06-09Using checks of the existence of HEADER_{foo}_H in other header filesRichard Levitte
was a really bad idea. For example, the following: #include <x509.h> #include <bio.h> #include <asn1.h> would make sure that things like ASN1_UTCTIME_print() wasn't defined unless you moved the inclusion of bio.h to above the inclusion of x509.h. The reason is that x509.h includes asn1.h, and the declaration of ASN1_UTCTIME_print() depended on the definition of HEADER_BIO_H. That's what I call an obscure bug. Instead, this change makes sure that whatever header files are needed for the correct process of one header file are included automagically, and that the definitions of, for example, BIO-related things are dependent on the absence of the NO_{foo} macros. This is also consistent with the way parts of OpenSSL can be excluded at will.
2000-05-02In Message-ID: <003201bfb332$14a07520$0801a8c0@janm.transactionsite.com>,Richard Levitte
"Jan Mikkelsen" <janm@transactionsite.com> correctly states that the OpenSSL header files have #include's and extern "C"'s in an incorrect order. Thusly fixed.
2000-03-18Eliminate memory leaks in mem_dbg.c.Bodo Möller
2000-01-30Source code cleanups: Use void * rather than char * in lhash,Ulf Möller
eliminate some of the -Wcast-qual warnings (debug-ben-strict target)
1999-04-26Remove NOPROTO definitions and error code comments.Ulf Möller
1999-04-24Fix header files so that any one can be included first.Bodo Möller
Submitted by: Reviewed by: PR:
1999-04-17Massive constification.Ben Laurie
1998-12-21Import of old SSLeay release: SSLeay 0.9.1b (unreleased)SSLeayRalf S. Engelschall
1998-12-21Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall
1998-12-21Import of old SSLeay release: SSLeay 0.8.1bRalf S. Engelschall