-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nils Larsch schrieb:
> Moin Goetz,
Moin Nils,

> Goetz Babin-Ebell wrote:
> ..
>>>   Index: openssl/crypto/bio/bio.h
>>>  
>>> ============================================================================
>>>
>>>   $ cvs diff -u -r1.69 -r1.70 bio.h
>>>   --- openssl/crypto/bio/bio.h    18 Dec 2005 19:11:36 -0000    1.69
>>>   +++ openssl/crypto/bio/bio.h    29 Nov 2006 20:54:55 -0000    1.70
>> [...]
>>>   @@ -246,14 +250,14 @@
>>>    #define BIO_cb_pre(a)    (!((a)&BIO_CB_RETURN))
>>>    #define BIO_cb_post(a)    ((a)&BIO_CB_RETURN)
>>>      -#define BIO_set_callback(b,cb)        ((b)->callback=(cb))
>>>   -#define BIO_set_callback_arg(b,arg)    ((b)->cb_arg=(char *)(arg))
>>>   -#define BIO_get_callback_arg(b)        ((b)->cb_arg)
>>>   -#define BIO_get_callback(b)        ((b)->callback)
>>>   -#define BIO_method_name(b)        ((b)->method->name)
>>>   -#define BIO_method_type(b)        ((b)->method->type)
>>>   +long (*BIO_get_callback(const BIO *b)) (struct bio_st *,int,const
>>> char *,int, long,long);
>>>   +void BIO_set_callback(BIO *b,   +    long (*callback)(struct
>>> bio_st *,int,const char *,int, long,long));
>>                                              ^^^^^^^^^^^^
>>>   +char *BIO_get_callback_arg(const BIO *b);
>>      ^^^^^^
>>>   +void BIO_set_callback_arg(BIO *b, char *arg);
>>                                        ^^^^^^^^^
>> I think these should be void *
> 
> I agree that a void pointer would be more appropriate here but IMHO
> the type used to set a value should be the same type used in the
> structure which is currently a char pointer (which is the same type
> as the second parameter of the bio callback ...).

Since a void* is better than a char*, we also should change the type
in the structure and the callback.
It is not the first instance in the library where a char* is used in
a place a void* is more appropriately...

At least the head is supposed to break compatibility if that
improves the general usability...

Bye

Goetz

- --
DMCA: The greed of the few outweighs the freedom of the many
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFbpci2iGqZUF3qPYRAiiaAJ4vJ5PTQtw3RxwVHhwC0Heudg+yfwCbBv0X
Dc96qTtTsLE9tUKgjUiXan0=
=v43k
-----END PGP SIGNATURE-----
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to