ffi_gen icon indicating copy to clipboard operation
ffi_gen copied to clipboard

by_ref should be used for returned structs

Open ghazel opened this issue 9 years ago • 1 comments

As seen here https://github.com/ffi/ffi/wiki/Structs#pointers-to-functions if a function returns a pointer to a struct, it should use SomeStruct.by_ref as the return type. Otherwise, ffi returns an FFI::Pointer.

ghazel avatar Apr 02 '15 03:04 ghazel

Agreed.

thoughtafter avatar Nov 25 '17 23:11 thoughtafter