From 43275967b547f72dcb2f41c698c64575e1374214 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 7 May 2017 15:12:35 -0700 Subject: ffi: rethink passing and alloc scheme for bufs. Backing out of the scheme of (ptr buf) passing the address of the internal pointer within buf objects. Also giving buf in handlers, to prevent the fallback on get. * buf.c (buf_addr_of): Function removed. * buf.h (buf_addr_of): Declaration removed. * ffi.c (ffi_buf_in, ffi_buf_d_in): New functions. (ffi_buf_alloc): Function removed. (ffi_type_compile, ffi_init_types): Remove specialty alloc and free functions from buffers, so the regular fixed allocator is used. Give buffers the new in functions. --- buf.h | 1 - 1 file changed, 1 deletion(-) (limited to 'buf.h') diff --git a/buf.h b/buf.h index b65f7037..8102fff8 100644 --- a/buf.h +++ b/buf.h @@ -32,7 +32,6 @@ val buf_trim(val buf); val buf_set_length(val obj, val len, val init_val); val length_buf(val buf); mem_t *buf_get(val buf, val self); -mem_t **buf_addr_of(val buf, val self); void buf_fill(val buf, mem_t *src, val self); #if HAVE_I8 -- cgit v1.2.3