mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
some fix
This commit is contained in:
parent
663ca1ccf0
commit
2b50aad4ef
@ -1557,7 +1557,9 @@ void VM::__post_init_builtin_types(){
|
|||||||
|
|
||||||
_all_types[tp_module].m__getattr__ = [](VM* vm, PyVar obj, StrName name) -> PyVar{
|
_all_types[tp_module].m__getattr__ = [](VM* vm, PyVar obj, StrName name) -> PyVar{
|
||||||
const Str& path = CAST(Str&, obj->attr(__path__));
|
const Str& path = CAST(Str&, obj->attr(__path__));
|
||||||
return vm->py_import(_S(path, ".", name.sv()), false);
|
PyObject* retval = vm->py_import(_S(path, ".", name.sv()), false);
|
||||||
|
if(retval) return retval;
|
||||||
|
return nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
bind_func(tp_property, "setter", 2, [](VM* vm, ArgsView args) {
|
bind_func(tp_property, "setter", 2, [](VM* vm, ArgsView args) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user