diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-18 20:13:20 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-18 20:13:20 -0700 |
commit | 159c8b4396d746390a8000f4a4d181255881a33c (patch) | |
tree | d58afe16e8d52aea2fced6f93a73e099ec4b6e07 | |
parent | 4a5b6f32a7a38a700f42848877d3719b73452dcb (diff) | |
download | txr-159c8b4396d746390a8000f4a4d181255881a33c.tar.gz txr-159c8b4396d746390a8000f4a4d181255881a33c.tar.bz2 txr-159c8b4396d746390a8000f4a4d181255881a33c.zip |
ffi: unknown carray length represented as nil.
* ffi.c (length_carray): Convert the internal representation
of unknown length, which is a -1 of type cnum, into a nil
return value.
-rw-r--r-- | ffi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2397,7 +2397,7 @@ val carray_type(val carray) val length_carray(val carray) { struct carray *scry = carray_struct_checked(carray); - return num(scry->nelem); + return if3(scry->nelem < 0, nil, num(scry->nelem)); } mem_t *carray_get(val carray, val type, val self) |