fix init problem

This commit is contained in:
blueloveTH 2024-05-03 16:04:41 +08:00
parent 48bd3e113e
commit 40f95580d3
2 changed files with 7 additions and 3 deletions

View File

@ -363,8 +363,12 @@ public:
}
struct ImportContext{
PK_ALWAYS_PASS_BY_POINTER(ImportContext)
std::vector<Str> pending;
pod_vector<bool> pending_is_init; // a.k.a __init__.py
std::vector<bool> pending_is_init; // a.k.a __init__.py
ImportContext() {}
struct Temp{
PK_ALWAYS_PASS_BY_POINTER(Temp)

View File

@ -267,8 +267,8 @@ struct MemoryPool{
}
};
static MemoryPool<64>* pool64;
static MemoryPool<128>* pool128;
static MemoryPool<64>* pool64 = nullptr;
static MemoryPool<128>* pool128 = nullptr;
void init_memory_pools_if_needed(){
if(pool64 == nullptr) pool64 = new MemoryPool<64>();