[C++-sig] [Py++] ctypes generator produces wrong Python code for function pointers in structs

2009-12-25 Thread Nikolaus Rath
Hello, Py++ translates the struct typedef int cb_fun_t(char *); struct info { cb_fun_t* cb_fun; int flag; }; into the Python Structure class info(ctypes.Structure): """class info""" info._fields_ = [ #class info ("cb_fun", ctypes.POINTER( ctypes.CFUNCTYPE( ctypes.c_int, ctypes.c_c

[C++-sig] [Py++] ctypes generator ignores bit fields

2009-12-25 Thread Nikolaus Rath
Hello, The ctypes code generator translates the struct struct fuse_file_info { int flags; unsigned long fh_old; int writepage; unsigned int direct_io : 1; unsigned int keep_cache : 1; unsigned int flush : 1; unsigned int padding : 29;