[C++-sig] Python converters for raw pointers: request for help

Ravi lists_ravi at lavabit.com
Sat Oct 31 04:53:27 CET 2009


On Friday 23 October 2009 04:38:30 Michele De Stefano wrote:
> typedef struct _p_Mat*           Mat;

Creating a converter to/from a raw pointer is rather tricky (due to the way 
argument type deduction handles pointers & references seamlessly, IIUC). You 
should either expose _p_Mat or wrap the raw pointer in a struct and then 
expose converters to it:
  struct Mat { struct _p_Mat *ptr; };
If you come up with a better way, I'd be interested.

Regards,
Ravi



More information about the Cplusplus-sig mailing list