<BPL>
ok, n.mind, I'll ask it anyway. Let's say in c++ I've got some `unsigned char* buffer` pointing out to some allocated memory. If I do in python `p = (ctypes.c_ubyte * len(pbits.x)).from_buffer(pbits.x)` I'll get a nice c_ubyte_Array object, so far so good, now...
<BPL>
if I've got in c++ `unsigned char* layers[MAX_BUFFERS]` pointing out to some allocated memory and I do in python `(ctypes.c_ubyte * len(pbits.layers[0])).from_buffer(pbits.layers[0])` I'll get a nice crash telling me that "TypeError: object of type 'int' has no len()"
<BPL>
so, what am I doing wrong? How should I get the c_ubyte_Array out layers? Ty in advance
<BPL>
Ok... here's a mcve that clarifies my question https://bpaste.net/show/OPXp , line #31 will produce the exception I've mentioned above, anyone knows how to fix that?
xcm has quit [Remote host closed the connection]
tsaka__ has quit [Ping timeout: 258 seconds]
xcm has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
tsaka__ has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
antocuni has quit [Ping timeout: 244 seconds]
Ninpo has quit [Ping timeout: 268 seconds]
antocuni has joined #pypy
eregon_ has quit [Ping timeout: 268 seconds]
ilbelkyr_ has joined #pypy
eregon has joined #pypy
antocuni has quit [Ping timeout: 272 seconds]
ilbelkyr has quit [Ping timeout: 600 seconds]
Ninpo has joined #pypy
antocuni has joined #pypy
agronholm has joined #pypy
antocuni has quit [Remote host closed the connection]