[Pyrex] strings, bytes, unsigned char * and the dreaded null...

Bryan O'Sullivan bos at serpentine.com
Wed Nov 15 21:24:13 UTC 2006


Jim McCoy wrote:

> setup_crypto(unsigned char *key, int keylen)
> do_crypto(unsigned char *input, unsigned char *output)
> 
> 
> Any suggestions as the "the pyrex way" regarding this would be greatly 
> appreciated.

Just make PyString_AsStringAndSize available to Pyrex in the usual way, 
and use the results of calling that on your Python string object.

	<b



More information about the Pyrex mailing list