浏览代码

Update pocketpy.h

blueloveTH 3 年之前
父节点
当前提交
ee1f8091c7
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      src/pocketpy.h

+ 2 - 4
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;
     });