Re: C array pointers
- Posted by begin Jul 11, 2018
- 1859 views
yes that works, but what threw me was, that the the 64bit integer is also only 4 bytes long
public procedure drawpoly(sequence polypointegers) integer len = 0, j=0 ifdef BITS32 then len = 4 elsedef len = 4 --8 64bit ????????? end ifdef integer plen = length(polypointegers) atom poly = allocate(len*plen, true) for i=1 to plen do pokeN(poly+j, polypointegers[i], len) j += len end for c_proc(_drawpoly,{plen, poly}) end procedure
but maybe there is even a better way then the one above.
thanks richard