mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 19:40:18 +00:00
Update pocketpy.h
This commit is contained in:
parent
d03d168b8c
commit
fc6f61ad3d
@ -40,10 +40,11 @@ void __initializeBuiltinFunctions(VM* _vm) {
|
|||||||
#undef BIND_NUM_LOGICAL_OPT
|
#undef BIND_NUM_LOGICAL_OPT
|
||||||
|
|
||||||
_vm->bindBuiltinFunc("print", [](VM* vm, PyVarList args) {
|
_vm->bindBuiltinFunc("print", [](VM* vm, PyVarList args) {
|
||||||
|
_StrStream ss;
|
||||||
for (auto& arg : args){
|
for (auto& arg : args){
|
||||||
_Str s = vm->PyStr_AS_C(vm->asStr(arg)) + " ";
|
ss << vm->PyStr_AS_C(vm->asStr(arg)) << " ";
|
||||||
vm->_stdout(vm, s.c_str());
|
|
||||||
}
|
}
|
||||||
|
vm->_stdout(ss.str());
|
||||||
vm->_stdout(vm, "\n");
|
vm->_stdout(vm, "\n");
|
||||||
return vm->None;
|
return vm->None;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user