mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-22 12:30:19 +00:00
some fix
This commit is contained in:
parent
e33816b64b
commit
583f91399c
@ -53,11 +53,6 @@ struct GIL {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************/
|
/*******************************************************************************/
|
||||||
|
|
||||||
#define PK_UNUSED(x) (void)(x)
|
|
||||||
|
|
||||||
#define PK_LOCAL_STATIC static
|
|
||||||
|
|
||||||
namespace pkpy{
|
namespace pkpy{
|
||||||
|
|
||||||
namespace std = ::std;
|
namespace std = ::std;
|
||||||
|
@ -98,7 +98,7 @@ namespace pkpy{
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Compiler::init_pratt_rules(){
|
void Compiler::init_pratt_rules(){
|
||||||
PK_LOCAL_STATIC bool initialized = false;
|
static bool initialized = false;
|
||||||
if(initialized) return;
|
if(initialized) return;
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
|
||||||
|
@ -148,9 +148,7 @@ void add_module_io(VM* vm){
|
|||||||
mod->attr().set("SEEK_END", VAR(SEEK_END));
|
mod->attr().set("SEEK_END", VAR(SEEK_END));
|
||||||
|
|
||||||
vm->bind(vm->builtins, "open(path, mode='r')", [](VM* vm, ArgsView args){
|
vm->bind(vm->builtins, "open(path, mode='r')", [](VM* vm, ArgsView args){
|
||||||
PK_LOCAL_STATIC StrName m_io("io");
|
return vm->call(vm->_modules["io"]->attr("FileIO"), args[0], args[1]);
|
||||||
PK_LOCAL_STATIC StrName m_FileIO("FileIO");
|
|
||||||
return vm->call(vm->_modules[m_io]->attr(m_FileIO), args[0], args[1]);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user