summaryrefslogtreecommitdiffstats
path: root/ffi.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-07-15 08:59:32 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-07-15 08:59:32 -0700
commitb15f6304249de5ba503bedc9944cb57aa1771cd8 (patch)
tree7437e211ae4b3f52ee0cfad44040691669fdb5d3 /ffi.c
parentf06b7cfa63a93512e4764cfd424ae2e838f8de4d (diff)
downloadtxr-b15f6304249de5ba503bedc9944cb57aa1771cd8.tar.gz
txr-b15f6304249de5ba503bedc9944cb57aa1771cd8.tar.bz2
txr-b15f6304249de5ba503bedc9944cb57aa1771cd8.zip
Fix use of raw null constant in carray implementation.
* ffi.c (carray_cptr): Ref argument in make_carray call should be specified as nil not 0. The meaning is the same, but it's wrong style for TXR internals.
Diffstat (limited to 'ffi.c')
-rw-r--r--ffi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffi.c b/ffi.c
index 9d1163f5..4aa67d89 100644
--- a/ffi.c
+++ b/ffi.c
@@ -4803,7 +4803,7 @@ val carray_cptr(val cptr, val type, val len)
mem_t *data = cptr_get(cptr);
cnum nelem = c_num(default_arg(len, negone));
(void) ffi_type_struct(type);
- return make_carray(type, data, nelem, 0);
+ return make_carray(type, data, nelem, nil);
}
val vec_carray(val carray, val null_term_p)