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.
This commit is contained in:
@@ -109,6 +109,11 @@ err:
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
STACK *sk_new_null(void)
|
||||
{
|
||||
return sk_new((int (*)(const char * const *, const char * const *))NULL);
|
||||
}
|
||||
|
||||
STACK *sk_new(int (*c)(const char * const *, const char * const *))
|
||||
{
|
||||
STACK *ret;
|
||||
|
Reference in New Issue
Block a user