Update tuplelist.cpp

This commit is contained in:
blueloveTH 2024-06-01 21:52:36 +08:00
parent 2f96712371
commit bd364d9967

View File

@ -6,7 +6,7 @@ Tuple::Tuple(int n){
if(n <= INLINED_SIZE){
this->_args = _inlined;
}else{
this->_args = (PyVar*)pool128_alloc(n * sizeof(PyVar));
this->_args = (PyVar*)malloc(n * sizeof(PyVar));
}
this->_size = n;
}
@ -45,7 +45,7 @@ Tuple::Tuple(PyVar _0, PyVar _1, PyVar _2, PyVar _3): Tuple(4){
_args[3] = _3;
}
Tuple::~Tuple(){ if(!is_inlined()) pool128_dealloc(_args); }
Tuple::~Tuple(){ if(!is_inlined()) free(_args); }
List ArgsView::to_list() const{
List ret(size());