Re: FFI question for Gregg

new topic     » goto parent     » topic index » view thread      » older message » newer message
ChrisB said...

FFI's definition of allocate_string takes one parameter, and the std's definition takes two,

 
ffi - allocate_string(sequence string) 
 
std - allocate_string(sequence string, boolean clean) 
 

Sure, but the distinction is irrelevant. The code in std/ffi.e that allocates strings always calls free() on them later. If I had a cleanup parameter it would never get used. It's not meant to be a complete replacement for the standard library function; it's just enough to avoid repeating myself. The places where that is used will end up in the backend which uses its own C methods for allocating strings.

-Greg

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

Search



Quick Links

User menu

Not signed in.

Misc Menu