openssl/crypto/lhash
Geoff Thorpe dfa46e502d Next step in tidying up the LHASH code. This commit defines DECLARE and
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-02 23:08:59 +00:00
..
.cvsignore Ignore Makefile.save 1999-04-29 16:04:54 +00:00
lh_stats.c Constification of LHASH. Contributed by "Paul D. Smith" <psmith@gnu.org> 2000-11-07 23:43:21 +00:00
lh_test.c There have been a number of complaints from a number of sources that names 2000-06-01 22:19:21 +00:00
lhash.c First step in tidying up the LHASH code. The callback prototypes (and 2000-12-01 20:31:52 +00:00
lhash.h Next step in tidying up the LHASH code. This commit defines DECLARE and 2000-12-02 23:08:59 +00:00
Makefile.ssl 'ranlib' doesn't always run on some systems. That's actually 2000-09-25 08:53:15 +00:00
num.pl Import of old SSLeay release: SSLeay 0.8.1b 1998-12-21 10:52:47 +00:00