diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-06-17 01:29:26 +0200 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-06-17 01:29:26 +0200 |
commit | 3aceb94b9e6ac4722b96d4fb1cf7e1a4358941e0 (patch) | |
tree | 9adfd28b708d52c0f0efac181d7cfadc0f1ecb9a /crypto/objects/o_names.c | |
parent | Change to have a single library that works on both Win9x and WinNT. (diff) | |
download | openssl-3aceb94b9e6ac4722b96d4fb1cf7e1a4358941e0.tar.xz openssl-3aceb94b9e6ac4722b96d4fb1cf7e1a4358941e0.zip |
Safe stack reorganisation in terms of function casts.
After some messing around this seems to work but needs
a few more tests. Working out the syntax for sk_set_cmp_func()
(cast it to a function that itself returns a function pointer)
was painful :-(
Needs some testing to see what other compilers think of this
syntax.
Also needs similar stuff for ASN1_SET_OF etc etc.
Diffstat (limited to 'crypto/objects/o_names.c')
-rw-r--r-- | crypto/objects/o_names.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/crypto/objects/o_names.c b/crypto/objects/o_names.c index aa82a8a07c..f6bb643491 100644 --- a/crypto/objects/o_names.c +++ b/crypto/objects/o_names.c @@ -20,37 +20,6 @@ typedef struct name_funcs_st } NAME_FUNCS; DECLARE_STACK_OF(NAME_FUNCS) -/* This block of defines is updated by a perl script, please do not touch! */ -#ifndef DEBUG_SAFESTACK - #define sk_NAME_FUNCS_new(a) sk_new((int (*) \ - (const char * const *, const char * const *))(a)) - #define sk_NAME_FUNCS_new_null() sk_new_null() - #define sk_NAME_FUNCS_free(a) sk_free(a) - #define sk_NAME_FUNCS_num(a) sk_num(a) - #define sk_NAME_FUNCS_value(a,b) ((NAME_FUNCS *) \ - sk_value((a),(b))) - #define sk_NAME_FUNCS_set(a,b,c) ((NAME_FUNCS *) \ - sk_set((a),(b),(char *)(c))) - #define sk_NAME_FUNCS_zero(a) sk_zero(a) - #define sk_NAME_FUNCS_push(a,b) sk_push((a),(char *)(b)) - #define sk_NAME_FUNCS_unshift(a,b) sk_unshift((a),(b)) - #define sk_NAME_FUNCS_find(a,b) sk_find((a), (char *)(b)) - #define sk_NAME_FUNCS_delete(a,b) ((NAME_FUNCS *) \ - sk_delete((a),(b))) - #define sk_NAME_FUNCS_delete_ptr(a,b) ((NAME_FUNCS *) \ - sk_delete_ptr((a),(char *)(b))) - #define sk_NAME_FUNCS_insert(a,b,c) sk_insert((a),(char *)(b),(c)) - #define sk_NAME_FUNCS_set_cmp_func(a,b) ((int (*) \ - (const NAME_FUNCS * const *,const NAME_FUNCS * const *)) \ - sk_set_cmp_func((a),(int (*) \ - (const char * const *, const char * const *))(b))) - #define sk_NAME_FUNCS_dup(a) sk_dup(a) - #define sk_NAME_FUNCS_pop_free(a,b) sk_pop_free((a),(void (*)(void *))(b)) - #define sk_NAME_FUNCS_shift(a) ((NAME_FUNCS *)sk_shift(a)) - #define sk_NAME_FUNCS_pop(a) ((NAME_FUNCS *)sk_pop(a)) - #define sk_NAME_FUNCS_sort(a) sk_sort(a) -#endif /* !DEBUG_SAFESTACK */ -/* End of perl script block, you may now edit :-) */ IMPLEMENT_STACK_OF(NAME_FUNCS) static STACK_OF(NAME_FUNCS) *name_funcs_stack; |