Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | ffi: no memcpy for string pointers. | Kaz Kylheku | 2017-04-26 | 1 | -7/+6 | |
| | | | | | | ffi.c (ffi_str_put, ffi_str_get, ffi_wstr_put, ffi_wstr_get): Use assignment instead of memcpy to move the string pointer to and from the buffer. | |||||
* | ffi: support buf objects. | Kaz Kylheku | 2017-04-26 | 1 | -0/+39 | |
| | | | | | | | | | | | | | | | | * buf.c (make_duplicate_buf, buf_get, buf_fill): New functions. * buf.h (make_duplicate_buf, buf_get, buf_fill): Declared. * ffi.c (struct txr_ffi_type): New member, nelem. Keeps track of number of elements, for types that are FFI pointers. This lets us support the get method so that a buf can be a C function return value, if its size is declared in our FFI type system. (ffi_buf_put, ffi_buf_get, ffi_buf_fill): New functions. (ffi_type_compile): Handle two new cases of syntax for buffers: (buf <size>) and buf. | |||||
* | Start of FFI implementation based on libffi. | Kaz Kylheku | 2017-04-24 | 1 | -0/+1133 | |
* Makefile (OBJS): Add ffi.o. * configure (have_libffi): New variable. (gen_config_make): Generate have_libffi make variable. New check for availability of libffi. * ffi.c, ffi.h: New files. * lib.c (init): Call ffi_init. |