mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-24 13:30:18 +00:00
fix init problem
This commit is contained in:
parent
48bd3e113e
commit
40f95580d3
@ -363,8 +363,12 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct ImportContext{
|
struct ImportContext{
|
||||||
|
PK_ALWAYS_PASS_BY_POINTER(ImportContext)
|
||||||
|
|
||||||
std::vector<Str> pending;
|
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{
|
struct Temp{
|
||||||
PK_ALWAYS_PASS_BY_POINTER(Temp)
|
PK_ALWAYS_PASS_BY_POINTER(Temp)
|
||||||
|
|||||||
@ -267,8 +267,8 @@ struct MemoryPool{
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static MemoryPool<64>* pool64;
|
static MemoryPool<64>* pool64 = nullptr;
|
||||||
static MemoryPool<128>* pool128;
|
static MemoryPool<128>* pool128 = nullptr;
|
||||||
|
|
||||||
void init_memory_pools_if_needed(){
|
void init_memory_pools_if_needed(){
|
||||||
if(pool64 == nullptr) pool64 = new MemoryPool<64>();
|
if(pool64 == nullptr) pool64 = new MemoryPool<64>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user