From e6b5c341b94d357b0158ad74b12edd51399a4b87 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Mon, 11 Jan 2016 14:11:13 +0000 Subject: 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 --- crypto/objects/obj_dat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crypto/objects/obj_dat.c') diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index bda955651e..51a44a285f 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -65,6 +65,7 @@ #include #include #include "internal/asn1_int.h" +#include "obj_lcl.h" /* obj_dat.h is generated from objects.h by obj_dat.pl */ #include "obj_dat.h" @@ -78,11 +79,10 @@ DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, obj); #define ADDED_LNAME 2 #define ADDED_NID 3 -typedef struct added_obj_st { +struct added_obj_st { int type; ASN1_OBJECT *obj; -} ADDED_OBJ; -DECLARE_LHASH_OF(ADDED_OBJ); +}; static int new_nid = NUM_NID; static LHASH_OF(ADDED_OBJ) *added = NULL; @@ -227,7 +227,7 @@ void OBJ_cleanup(void) } if (added == NULL) return; - lh_ADDED_OBJ_down_load(added) = 0; + lh_ADDED_OBJ_set_down_load(added, 0); lh_ADDED_OBJ_doall(added, LHASH_DOALL_FN(cleanup1)); /* zero counters */ lh_ADDED_OBJ_doall(added, LHASH_DOALL_FN(cleanup2)); /* set counters */ lh_ADDED_OBJ_doall(added, LHASH_DOALL_FN(cleanup3)); /* free objects */ -- cgit v1.2.3