summaryrefslogtreecommitdiffstats
path: root/ffi.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-05-04 20:40:55 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-05-04 20:40:55 -0700
commite5186dace2ce5c13c2a178b67507a3f917f4ed25 (patch)
tree365929fae624706089d854ee9c50cb7dc3378e5c /ffi.h
parent7246e3eff36f290b207b203c40f90850ddd031e8 (diff)
downloadtxr-e5186dace2ce5c13c2a178b67507a3f917f4ed25.tar.gz
txr-e5186dace2ce5c13c2a178b67507a3f917f4ed25.tar.bz2
txr-e5186dace2ce5c13c2a178b67507a3f917f4ed25.zip
ffi: new bstr type.
The bstr type is like str, but doesn't perform UTF-8 conversion. The C data is assumed to be null terminated byte strings representing code points U+0000 through U+00FF. * ffi.c (bstr_s, bstr_d_s): New symbol variables. (ffi_bstr_put, ffi_bstr_get, ffi_bstr_d_get): New static functions. (ffi_init_types): Register bstr and bstr-d types. (ffi_init): Initialize bstr_s and bstr_d_s. * ffi.h (bstr_s, bstr_d_s): Declared. * lib.c (chk_strdup_8bit, string_8bit): New function. * lib.h (chk_strdup_8bit, string_8bit): Declared.
Diffstat (limited to 'ffi.h')
-rw-r--r--ffi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffi.h b/ffi.h
index 3f9f421d..c598044f 100644
--- a/ffi.h
+++ b/ffi.h
@@ -41,7 +41,7 @@ extern val array_s, zarray_s;
extern val struct_s;
-extern val str_d_s, wstr_s, wstr_d_s;
+extern val str_d_s, wstr_s, wstr_d_s, bstr_s, bstr_d_s;
extern val buf_d_s;