From: Mathieu M. <mat...@gm...> - 2008-05-04 15:45:04
|
Hi there, I cannot understand how to use cdata to do this simple task. Let say I have this class: class A { public: unsigned int GetLength(); void GetBuffer(char *strout); }; In C++ you would use it this way: A a; char *buffer = new char[a.GetLength()]; a.GetBuffer(buffer); I would like that it behave juste like python: readlines() function. It should return the properly allocated string as a PyString (may contains NULL character). Thanks a bunch ! -- Mathieu |