Re: C array pointers
- Posted by begin Jul 12, 2018
- 1803 views
petelomax said...
begin said...
what do i do wrong??
what happens if you just do this (on 64 bit [and on 32 bit])?
public procedure drawpoly(sequence polypointegers) integer plen = length(polypointegers) atom poly = allocate(4*plen, true) poke4(poly, polypointegers) c_proc(_drawpoly,{plen, poly}) end procedure
Pete
doesn't work in 64 bit
points[i].x 100 points[i].y 0 points[i].x 100 points[i].y 0 points[i].x 200 points[i].y 0 points[i].x 300 points[i].y 0 points[i].x 100 points[i].y 0 points[i].x 150 points[i].y 0 points[i].x 200 points[i].y 0 points[i].x 100 points[i].y 0
32bit:
points[i].x 100 points[i].y 100 points[i].x 200 points[i].y 300 points[i].x 100 points[i].y 150 points[i].x 200 points[i].y 100 points[i].x 400 points[i].y 100 points[i].x 200 points[i].y 300 points[i].x 380 points[i].y 150 points[i].x 100 points[i].y 100
with poke8 on 64bit doesn't work:
points[i].x 100 points[i].y 0 points[i].x 100 points[i].y 0 points[i].x 200 points[i].y 0 points[i].x 300 points[i].y 0 points[i].x 100 points[i].y 0 points[i].x 150 points[i].y 0 points[i].x 200 points[i].y 0 points[i].x 100 points[i].y 0