diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-08 21:39:00 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-08 21:39:00 -0700 |
commit | 7b3c8ad97b41a724203242bb4073d74a44dc6804 (patch) | |
tree | c9ff9733ebe26a3432fa6271921c7482c918b5d2 | |
parent | 21c445fd82fe7b3da332fcd89084807de3d41645 (diff) | |
download | txr-7b3c8ad97b41a724203242bb4073d74a44dc6804.tar.gz txr-7b3c8ad97b41a724203242bb4073d74a44dc6804.tar.bz2 txr-7b3c8ad97b41a724203242bb4073d74a44dc6804.zip |
ffi: improve printed representation of closures.
* ffi.c (ffi_closure_print_op): Add information to the
printed representation: the Lisp function, and call desc.
Eliminate spurious # character before closing angle bracket.
-rw-r--r-- | ffi.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -201,9 +201,10 @@ static struct txr_ffi_closure *ffi_closure_struct_checked(val obj) static void ffi_closure_print_op(val obj, val out, val pretty, struct strm_ctx *ctx) { + struct txr_ffi_closure *tfcl = ffi_closure_struct(obj); put_string(lit("#<"), out); obj_print_impl(obj->co.cls, out, pretty, ctx); - put_string(lit("#>"), out); + format(out, lit(" ~s ~s>"), tfcl->fun, tfcl->call_desc, nao); } static void ffi_closure_destroy_op(val obj) |