diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-04-29 12:26:26 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-04-29 12:26:26 -0700 |
commit | 5c9f482790a97c075d75d903e35a4cf7f09134c2 (patch) | |
tree | 9c8e4b88126049f024c1d8ea7564bd58b6805cf6 /ffi.h | |
parent | cced80ab687b521a1d07e53e1be70a33ea711d0f (diff) | |
download | txr-5c9f482790a97c075d75d903e35a4cf7f09134c2.tar.gz txr-5c9f482790a97c075d75d903e35a4cf7f09134c2.tar.bz2 txr-5c9f482790a97c075d75d903e35a4cf7f09134c2.zip |
ffi: ptr types map between nil and null pointers.
On the way out, if a ptr or ptr-in type encounters nil, it
passes a null pointer. On the way in, a null C pointer
received by a ptr type turns to the nil object.
* ffi.c (ffi_ptr_in_put, ffi_ptr_in_d_put, ffi_ptr_out_put,
ffi_ptr_put): Check for nil, and put out null pointer in that
case. (ffi_ptr_out_get, ffi_ptr_out_d_get): Check for null
pointer coming in and turn to nil.
Diffstat (limited to 'ffi.h')
0 files changed, 0 insertions, 0 deletions