diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-04-28 22:53:20 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-04-28 22:53:20 -0700 |
commit | d2ae9d8070d38221ee323b6679152bbbc4d7acd7 (patch) | |
tree | c39b7de60b8047b5a2d944edc16d077638891038 | |
parent | 83567797abfc42bc8d3ecc2a7ab1f250f1e6b93e (diff) | |
download | txr-d2ae9d8070d38221ee323b6679152bbbc4d7acd7.tar.gz txr-d2ae9d8070d38221ee323b6679152bbbc4d7acd7.tar.bz2 txr-d2ae9d8070d38221ee323b6679152bbbc4d7acd7.zip |
ffi: bugfix: ptr-in doesn't write pointer.
* ffi.c (ffi_ptr_in_put): We must write the allocated
buffer's pointer to the destination memory location,
otherwise nothing is passed, but garbage.
-rw-r--r-- | ffi.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -673,6 +673,7 @@ static void ffi_ptr_in_put(struct txr_ffi_type *tft, val s, mem_t *dst, mem_t *buf = tgtft->alloc(tgtft, s, self); tgtft->put(tgtft, s, buf, rtvec, self); rtvec[tft->rtidx] = buf; + *coerce(mem_t **, dst) = buf; } static void ffi_ptr_out_in(struct txr_ffi_type *tft, val obj, |