Re: sdl2 and ffi
- Posted by ChrisB (moderator) Nov 17, 2022
- 2373 views
Thanks
slightly change allocate_string in ffi
public function allocate_string( sequence s, integer cleanup = 0 ) atom mem = machine_func( M_ALLOC, length(s) + 1 ) if mem then poke( mem, s ) poke( mem+length(s), 0 ) end if if cleanup then end if return mem end function
This brings it more in line with eu's machin.e allocate_string(). You'll note the cleanup is basically just a stub.
Note, I'm just getting them to work atm, don't know if this is the best way.
Cheers
Chris