diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-05-10 16:28:49 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-05-10 16:31:50 +0200 |
commit | 0cb10c62a0d663fe42cebb4134e7cfcd3c461156 (patch) | |
tree | 51decb6c88de07fa9c8bb5d31491b47ff781d741 /lib.c | |
parent | eb8a64d461851756e65093edf923bd534e86aae5 (diff) |
vm: implement mechanism to change output file descriptor
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -292,7 +292,7 @@ uc_print_common(uc_vm *vm, size_t nargs, FILE *fh) static uc_value_t * uc_print(uc_vm *vm, size_t nargs) { - return uc_print_common(vm, nargs, stdout); + return uc_print_common(vm, nargs, vm->output); } static uc_value_t * @@ -1495,7 +1495,7 @@ uc_printf(uc_vm *vm, size_t nargs) uc_printf_common(vm, nargs, buf); - len = fwrite(buf->buf, 1, printbuf_length(buf), stdout); + len = fwrite(buf->buf, 1, printbuf_length(buf), vm->output); printbuf_free(buf); |