diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-04-28 22:59:48 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-04-28 22:59:48 -0700 |
commit | 83567797abfc42bc8d3ecc2a7ab1f250f1e6b93e (patch) | |
tree | c01216c55161818cba9e40ca5be1baff8e000ad0 | |
parent | c023a09e3faeef479ba866445a7a346b8e9c3f8a (diff) | |
download | txr-83567797abfc42bc8d3ecc2a7ab1f250f1e6b93e.tar.gz txr-83567797abfc42bc8d3ecc2a7ab1f250f1e6b93e.tar.bz2 txr-83567797abfc42bc8d3ecc2a7ab1f250f1e6b93e.zip |
ffi: drop obsolete restrictions in type compiler.
* ffi.c (ffi_type_compile): The ptr-out and ptr-in-out
types can work with target types that don't have a
fill function and fixed allocation.
-rw-r--r-- | ffi.c | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -1104,20 +1104,12 @@ val ffi_type_compile(val syntax) ffi_ptr_in_in, target_type); } else if (sym == ptr_out_s) { val target_type = ffi_type_compile(cadr(syntax)); - struct txr_ffi_type *tft = ffi_type_struct(target_type); - if (tft->fill == 0 && tft->alloc == ffi_fixed_alloc) - uw_throwf(error_s, lit("~a: ~s cannot be ptr-out target"), - self, cadr(syntax), nao); return make_ffi_type_pointer(syntax, cptr_s, sizeof (mem_t *), &ffi_type_pointer, ffi_ptr_out_put, ffi_ptr_out_get, ffi_ptr_out_in, target_type); } else if (sym == ptr_in_out_s) { val target_type = ffi_type_compile(cadr(syntax)); - struct txr_ffi_type *tft = ffi_type_struct(target_type); - if (tft->fill == 0 && tft->alloc == ffi_fixed_alloc) - uw_throwf(error_s, lit("~a: ~s cannot be ptr-in-out target"), - self, cadr(syntax), nao); return make_ffi_type_pointer(syntax, cptr_s, sizeof (mem_t *), &ffi_type_pointer, ffi_ptr_in_out_put, ffi_ptr_out_get, |