diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-04 06:33:27 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-04 06:33:27 -0700 |
commit | 31319bcda188159ba0b453e0b1a328b76c253ab2 (patch) | |
tree | e14a59b7363890a0009d8e5e161882d38a730997 | |
parent | 959f4259bde59d89f257fdfec0334b421f1dd8ce (diff) | |
download | txr-31319bcda188159ba0b453e0b1a328b76c253ab2.tar.gz txr-31319bcda188159ba0b453e0b1a328b76c253ab2.tar.bz2 txr-31319bcda188159ba0b453e0b1a328b76c253ab2.zip |
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.
-rw-r--r-- | ffi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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, |