[EMAIL PROTECTED] wrote:
> 
> >Another solution (and I just checked this with a friend >who knows the C
> >standards pretty damn well) could be to use `void *' >for any argument
> >that is supposed to hold binary (non-text) data.
> 
> Get another friend. :)
> 
> void* is best used to indicate "can be a pointer to
> anything."
> 
> unsigned char* is best used to indicate "pointer to
> some bytes."

Unfortunately, that leads to evil casts in some cases. I tend to use
void * for "pointer to some bytes" in cases where the caller may have
something more specific than bytes in their hand (e.g. a structure).

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to