From ee1f8091c7ea8c90b56b98ee3497f0ebd0c33213 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sun, 13 Nov 2022 20:26:25 +0800 Subject: [PATCH] Update pocketpy.h --- src/pocketpy.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pocketpy.h b/src/pocketpy.h index b0270749..448c8a28 100644 --- a/src/pocketpy.h +++ b/src/pocketpy.h @@ -41,10 +41,8 @@ void __initializeBuiltinFunctions(VM* _vm) { _vm->bindBuiltinFunc("print", [](VM* vm, PyVarList args) { _StrStream ss; - for (auto& arg : args){ - ss << vm->PyStr_AS_C(vm->asStr(arg)) << " "; - } - vm->_stdout(ss.str()); + for (auto& arg : args) ss << vm->PyStr_AS_C(vm->asStr(arg)) << " "; + vm->_stdout(vm, ss.str().c_str()); vm->_stdout(vm, "\n"); return vm->None; });