mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-21 12:00:18 +00:00
Update safestl.h
This commit is contained in:
parent
be4ce003a3
commit
66cf67668c
@ -51,10 +51,13 @@ namespace pkpy {
|
||||
this->_size = 0;
|
||||
return;
|
||||
}
|
||||
if(n >= kMaxPoolSize || _args_pool[n].empty()){
|
||||
if(n >= kMaxPoolSize){
|
||||
this->_args = new PyVar[n];
|
||||
this->_size = n;
|
||||
}else{
|
||||
if(_args_pool[n].empty()){
|
||||
for(int i=0; i<8; i++) _args_pool[n].push_back(new PyVar[n]);
|
||||
}
|
||||
this->_args = _args_pool[n].back();
|
||||
this->_size = n;
|
||||
_args_pool[n].pop_back();
|
||||
|
Loading…
x
Reference in New Issue
Block a user