Commit e6b5c341 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

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: default avatarRich Salz <rsalz@openssl.org>
parent 8e423bde
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -153,7 +153,6 @@
 * required type of "FUNCTION*"). This removes the necessity for
 * macro-generated wrapper functions.
 */
DECLARE_LHASH_OF(FUNCTION);
static LHASH_OF(FUNCTION) *prog_init(void);
static int do_cmd(LHASH_OF(FUNCTION) *prog, int argc, char *argv[]);
static void list_pkey(void);
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@ typedef struct function_st {
    const OPTIONS *help;
} FUNCTION;

DECLARE_LHASH_OF(FUNCTION);

extern int asn1parse_main(int argc, char *argv[]);
extern int ca_main(int argc, char *argv[]);
extern int ciphers_main(int argc, char *argv[]);
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ typedef struct function_st {
    const OPTIONS *help;
} FUNCTION;

DECLARE_LHASH_OF(FUNCTION);

EOF

grep(s/\.o//, @ARGV);
+2 −3
Original line number Diff line number Diff line
@@ -202,9 +202,8 @@ void _CONF_free_data(CONF *conf)
    if (conf == NULL || conf->data == NULL)
        return;

    lh_CONF_VALUE_down_load(conf->data) = 0; /* evil thing to make * sure the
                                              * 'OPENSSL_free()' works as *
                                              * expected */
    /* evil thing to make sure the 'OPENSSL_free()' works as expected */
    lh_CONF_VALUE_set_down_load(conf->data, 0);
    lh_CONF_VALUE_doall_arg(conf->data,
                            LHASH_DOALL_ARG_FN(value_free_hash),
                            LHASH_OF(CONF_VALUE), conf->data);
+4 −0
Original line number Diff line number Diff line
@@ -216,6 +216,10 @@ struct engine_st {
    struct engine_st *next;
};

typedef struct st_engine_pile ENGINE_PILE;

DECLARE_LHASH_OF(ENGINE_PILE);

#ifdef  __cplusplus
}
#endif
Loading