mirror of
https://github.com/pocketpy/pocketpy
synced 2025-12-07 02:30:17 +00:00
Update vm.h
This commit is contained in:
parent
a61315d1f7
commit
8267af74b5
4
src/vm.h
4
src/vm.h
@ -466,7 +466,7 @@ public:
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
PyVar newModule(_Str name) {
|
PyVar newModule(_Str name, bool saveToPath=true) {
|
||||||
PyVar obj = newObject(_tp_module, (_Int)-2);
|
PyVar obj = newObject(_tp_module, (_Int)-2);
|
||||||
setAttr(obj, "__name__", PyStr(name));
|
setAttr(obj, "__name__", PyStr(name));
|
||||||
_modules[name] = obj;
|
_modules[name] = obj;
|
||||||
@ -608,7 +608,7 @@ public:
|
|||||||
this->True = newObject(_tp_bool, true);
|
this->True = newObject(_tp_bool, true);
|
||||||
this->False = newObject(_tp_bool, false);
|
this->False = newObject(_tp_bool, false);
|
||||||
this->builtins = newModule("__builtins__");
|
this->builtins = newModule("__builtins__");
|
||||||
this->_main = newModule("__main__");
|
this->_main = newModule("__main__", false);
|
||||||
|
|
||||||
setAttr(_tp_type, __base__, _tp_object);
|
setAttr(_tp_type, __base__, _tp_object);
|
||||||
setAttr(_tp_type, __class__, _tp_type);
|
setAttr(_tp_type, __class__, _tp_type);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user