From 9834f366dd06516b95ed919d6601f3d1ead0d3fe Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 4 May 2017 06:33:27 -0700 Subject: ffi: map FFI char type to character. * ffi.c (ffi_char_get): Get a char object as a Lisp character, rather than number. Users who want a byte to convert to a an integer can use one of the types int8 or uint8 instead. --- ffi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffi.c b/ffi.c index bb7b4d26..234ff2ab 100644 --- a/ffi.c +++ b/ffi.c @@ -379,7 +379,7 @@ static void ffi_char_put(struct txr_ffi_type *tft, val n, mem_t *dst, val self) static val ffi_char_get(struct txr_ffi_type *tft, mem_t *src, val self) { - return num_fast(*coerce(char *, src)); + return chr(*coerce(char *, src)); } static void ffi_uchar_put(struct txr_ffi_type *tft, val n, mem_t *dst, -- cgit v1.2.3