[Pyrex] Structure wrapping issue

Yann Vernier yann at donkey.dyndns.org
Sun Nov 14 14:38:21 CET 2004


On Sun, Nov 14, 2004 at 02:10:29PM +0100, Jergosh Slodkovic wrote:
> I was trying to wrap libgadu (library handling the protocol of a popular
> Polish IM) following the instructions in the 'Michael's Guide to Pyrex'
> at ldots.org and I sumbled upon a following problem:
> 
> Fragment of the original header (libgadu.h):
> 
> typedef uint32_t uin_t;
> (...)
> struct gg_login_params {
> 	uin_t uin;
> 	char *password;	
> 	(...)
> };
> 
> Code of my padu.pyx:
> 
> cdef extern from "libgadu.h":
> 	(...)
> 	ctypedef struct gg_login_params:
> 		int uin 	# uint32_t --> int [?]
> 		char* password
> 		(...)

Well, the struct above isn't a typedef. Just changing ctypedef to cdef
should clean it up. 

-- 
PGP fingerprint = 9242 DC15 2502 FEAB E15F  84C6 D538 EC09 5380 5746
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.copyleft.no/pipermail/pyrex/attachments/20041114/2a6ccff2/attachment.bin


More information about the Pyrex mailing list