Re: sdl2 and ffi

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

FAO Greg

Andy's simplewin demo works when you do this

 --object event = allocate_struct(event) 
 --this is the missing allocate_mem 
 object event = machine_func(16, 1024)   --16 is M_ALLOC 

I know that event is a union, and you can't access the union part of the event (not without lots of pointers referincing pointers spaghetti at least), but the first part is a structure, and you can access those.

Could I request an allocate_mem procedure in ffi, to allow for those rare events when users might want to allocate there own blocks of memory that don't fit into other types of memory allocation?

And....make your M_ALLOC, M_FREE etc public

Cheers Chris

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

Search



Quick Links

User menu

Not signed in.

Misc Menu