mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
596ecd5c9e
commit
c78275428f
1
src/vm.h
1
src/vm.h
@ -1568,6 +1568,7 @@ inline void CodeObjectSerializer::write_object(VM *vm, PyObject *obj){
|
||||
if(is_int(obj)) write_int(_CAST(i64, obj));
|
||||
else if(is_float(obj)) write_float(_CAST(f64, obj));
|
||||
else if(is_type(obj, vm->tp_str)) write_str(_CAST(Str&, obj));
|
||||
else if(is_type(obj, vm->tp_bool)) write_bool(_CAST(bool, obj));
|
||||
else{
|
||||
throw std::runtime_error(fmt(OBJ_NAME(vm->_t(obj)).escape(), " is not serializable"));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user