summaryrefslogtreecommitdiffstats
path: root/HACKING-toc.txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-24 23:25:29 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-24 23:25:29 -0700
commitbd4f590287953ab904a014764790feccb88becc9 (patch)
tree7e0e6110c1cdfea078946e66bd4992883c82592f /HACKING-toc.txr
parenta7ffb3583b2f805521372e511bafdce65318903c (diff)
downloadtxr-bd4f590287953ab904a014764790feccb88becc9.tar.gz
txr-bd4f590287953ab904a014764790feccb88becc9.tar.bz2
txr-bd4f590287953ab904a014764790feccb88becc9.zip
ffi: fix incorrect cptr type tag implementation.
We can't use the eltype field of the type structure to store the cptr tag symbol, because that is expected to be a type object and not a symbol. * ffi.c (struct txr_ffi_type): New member, tag. (ffi_cptr_put, ffi_cptr_get, ffi_cptr_alloc): Refer to tag rather than eltype. (ffi_type_compile): Handle the compound cptr type using the same code as the simple one in ffi_init_types: use make_ffi_type_builtin rather than make_ffi_type_pointer. Install the tag into the tag field. Also set up the forgotten alloc and free routines. (ffi_init_types): For cptr, explicitly initialize the tag to nil. This is not necessary since the structure is calloced, and we rely on that for nil all over the place, but here it serves as a reminder that cptr has a tag.
Diffstat (limited to 'HACKING-toc.txr')
0 files changed, 0 insertions, 0 deletions