mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-24 13:30:18 +00:00
Update tuplelist.cpp
This commit is contained in:
parent
2f96712371
commit
bd364d9967
@ -6,7 +6,7 @@ Tuple::Tuple(int n){
|
|||||||
if(n <= INLINED_SIZE){
|
if(n <= INLINED_SIZE){
|
||||||
this->_args = _inlined;
|
this->_args = _inlined;
|
||||||
}else{
|
}else{
|
||||||
this->_args = (PyVar*)pool128_alloc(n * sizeof(PyVar));
|
this->_args = (PyVar*)malloc(n * sizeof(PyVar));
|
||||||
}
|
}
|
||||||
this->_size = n;
|
this->_size = n;
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@ Tuple::Tuple(PyVar _0, PyVar _1, PyVar _2, PyVar _3): Tuple(4){
|
|||||||
_args[3] = _3;
|
_args[3] = _3;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tuple::~Tuple(){ if(!is_inlined()) pool128_dealloc(_args); }
|
Tuple::~Tuple(){ if(!is_inlined()) free(_args); }
|
||||||
|
|
||||||
List ArgsView::to_list() const{
|
List ArgsView::to_list() const{
|
||||||
List ret(size());
|
List ret(size());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user