DECLARE_STACK_OF(NAME_FUNCS)
IMPLEMENT_STACK_OF(NAME_FUNCS)
-STACK_OF(NAME_FUNCS) *name_funcs_stack;
+static STACK_OF(NAME_FUNCS) *name_funcs_stack;
static unsigned long obj_name_hash(OBJ_NAME *a);
static int obj_name_cmp(OBJ_NAME *a,OBJ_NAME *b);
return(names_lh != NULL);
}
-int OBJ_NAME_new_index(unsigned long (*hash_func)(), int (*cmp_func)(),
- void (*free_func)())
+int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),
+ int (*cmp_func)(const void *, const void *),
+ void (*free_func)(const char *, int, const char *))
{
int ret;
int i;
for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++)
{
MemCheck_off();
- name_funcs = Malloc(sizeof(NAME_FUNCS));
+ name_funcs = OPENSSL_malloc(sizeof(NAME_FUNCS));
name_funcs->hash_func = lh_strhash;
name_funcs->cmp_func = (int (*)())strcmp;
name_funcs->free_func = 0; /* NULL is often declared to
alias=type&OBJ_NAME_ALIAS;
type&= ~OBJ_NAME_ALIAS;
- onp=(OBJ_NAME *)Malloc(sizeof(OBJ_NAME));
+ onp=(OBJ_NAME *)OPENSSL_malloc(sizeof(OBJ_NAME));
if (onp == NULL)
{
/* ERROR */
sk_NAME_FUNCS_value(name_funcs_stack,ret->type)
->free_func(ret->name,ret->type,ret->data);
}
- Free(ret);
+ OPENSSL_free(ret);
}
else
{
sk_NAME_FUNCS_value(name_funcs_stack,ret->type)
->free_func(ret->name,ret->type,ret->data);
}
- Free(ret);
+ OPENSSL_free(ret);
return(1);
}
else
static void name_funcs_free(NAME_FUNCS *ptr)
{
- Free(ptr);
+ OPENSSL_free(ptr);
}
void OBJ_NAME_cleanup(int type)