Re: sdl2 and ffi

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu