summaryrefslogtreecommitdiff
path: root/src/lib_ffi.c
diff options
context:
space:
mode:
authorMike Pall <mike>2012-07-12 14:19:27 +0200
committerMike Pall <mike>2012-07-12 14:19:27 +0200
commit0e2f5be14006c343c11e2b42886f8dbfe18b27d2 (patch)
tree5b16fb0ab4ad3ace410163042f4b2789cb348444 /src/lib_ffi.c
parent53e28d7678c1c97bf3bae280abf3fce82f935e92 (diff)
downloadluajit-0e2f5be14006c343c11e2b42886f8dbfe18b27d2.tar.gz
luajit-0e2f5be14006c343c11e2b42886f8dbfe18b27d2.tar.bz2
luajit-0e2f5be14006c343c11e2b42886f8dbfe18b27d2.zip
FFI: Show address pointed to for tostring(ref), too.
Diffstat (limited to '')
-rw-r--r--src/lib_ffi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib_ffi.c b/src/lib_ffi.c
index 931164b7..c74b497a 100644
--- a/src/lib_ffi.c
+++ b/src/lib_ffi.c
@@ -284,7 +284,10 @@ LJLIB_CF(ffi_meta___tostring)
284 } else { 284 } else {
285 CTState *cts = ctype_cts(L); 285 CTState *cts = ctype_cts(L);
286 CType *ct = ctype_raw(cts, id); 286 CType *ct = ctype_raw(cts, id);
287 if (ctype_isref(ct->info)) ct = ctype_rawchild(cts, ct); 287 if (ctype_isref(ct->info)) {
288 p = *(void **)p;
289 ct = ctype_rawchild(cts, ct);
290 }
288 if (ctype_iscomplex(ct->info)) { 291 if (ctype_iscomplex(ct->info)) {
289 setstrV(L, L->top-1, lj_ctype_repr_complex(L, cdataptr(cd), ct->size)); 292 setstrV(L, L->top-1, lj_ctype_repr_complex(L, cdataptr(cd), ct->size));
290 goto checkgc; 293 goto checkgc;