mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-23 13:00:17 +00:00
fix a bug
This commit is contained in:
parent
7329c4288d
commit
9a4eef6168
7
src/vm.h
7
src/vm.h
@ -1062,10 +1062,6 @@ class ThreadedVM : public VM {
|
||||
return None;
|
||||
}
|
||||
|
||||
PyVar jsonRpc(const PyVar& obj){
|
||||
return jsonRpc(asJson(obj));
|
||||
}
|
||||
|
||||
void __deleteThread(){
|
||||
if(_thread != nullptr){
|
||||
if(!_thread->joinable()) UNREACHABLE();
|
||||
@ -1081,7 +1077,8 @@ public:
|
||||
if(tvm == nullptr) UNREACHABLE();
|
||||
tvm->__checkArgSize(args, 1);
|
||||
tvm->__checkType(args[0], vm->builtins->attribs["dict"_c]);
|
||||
return tvm->jsonRpc(args[0]);
|
||||
_Str _json = tvm->PyStr_AS_C(tvm->asJson(args[0]));
|
||||
return tvm->jsonRpc(_json);
|
||||
});
|
||||
|
||||
bindBuiltinFunc("input", [](VM* vm, const pkpy::ArgList& args) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user