aboutsummaryrefslogtreecommitdiff
path: root/crypto/objects/o_names.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-01-11 14:11:13 +0000
committerDr. Stephen Henson <steve@openssl.org>2016-01-11 17:50:27 +0000
commite6b5c341b94d357b0158ad74b12edd51399a4b87 (patch)
tree0957d4adb18236b4f70e0edf836023d7b39a0d23 /crypto/objects/o_names.c
parent8e423bde2561bcddbc1d67f1fcc182d7dfa3f04d (diff)
downloadopenssl-e6b5c341b94d357b0158ad74b12edd51399a4b87.zip
openssl-e6b5c341b94d357b0158ad74b12edd51399a4b87.tar.gz
openssl-e6b5c341b94d357b0158ad74b12edd51399a4b87.tar.bz2
Inline LHASH_OF
Make LHASH_OF use static inline functions. Add new lh_get_down_load and lh_set_down_load functions and their typesafe inline equivalents. Make lh_error a function instead of a macro. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/objects/o_names.c')
-rw-r--r--crypto/objects/o_names.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/crypto/objects/o_names.c b/crypto/objects/o_names.c
index 476c377..df6240b 100644
--- a/crypto/objects/o_names.c
+++ b/crypto/objects/o_names.c
@@ -7,7 +7,7 @@
#include <openssl/objects.h>
#include <openssl/safestack.h>
#include <openssl/e_os2.h>
-#include "o_names.h"
+#include "obj_lcl.h"
/*
* Later versions of DEC C has started to add lnkage information to certain
@@ -25,7 +25,6 @@
* I use the ex_data stuff to manage the identifiers for the obj_name_types
* that applications may define. I only really use the free function field.
*/
-DECLARE_LHASH_OF(OBJ_NAME);
static LHASH_OF(OBJ_NAME) *names_lh = NULL;
static int names_type_num = OBJ_NAME_TYPE_NUM;
@@ -346,8 +345,8 @@ void OBJ_NAME_cleanup(int type)
return;
free_type = type;
- down_load = lh_OBJ_NAME_down_load(names_lh);
- lh_OBJ_NAME_down_load(names_lh) = 0;
+ down_load = lh_OBJ_NAME_get_down_load(names_lh);
+ lh_OBJ_NAME_set_down_load(names_lh, 0);
lh_OBJ_NAME_doall(names_lh, LHASH_DOALL_FN(names_lh_free));
if (type < 0) {
@@ -356,5 +355,5 @@ void OBJ_NAME_cleanup(int type)
names_lh = NULL;
name_funcs_stack = NULL;
} else
- lh_OBJ_NAME_down_load(names_lh) = down_load;
+ lh_OBJ_NAME_set_down_load(names_lh, down_load);
}