On Mon, Oct 25, 2010 at 1:51 PM, Marek Denis <ma...@octogan.net> wrote:
now I'd like to know whether it's possible to get access to the raw memory > from Python layer. > Let's suppose I have the char* ptr pointer that points to the memory chunk > with IPv4 packet. I would like to be able to read (and preferably write) > data from Python layer (not via wrapped object that contains char* ptr and > has some methods to write/read data), but without making any memory copies. > Would it work for you to create a 'buffer' object in your C++ code? I haven't used that myself, but my impression is that the Python 'buffer' datatype exists specifically to address such issues. http://docs.python.org/release/2.5.4/lib/typesseq.html
_______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig