mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-25 22:10:17 +00:00
...
This commit is contained in:
parent
27aa41fc35
commit
049d923958
@ -11,13 +11,13 @@ using List = pod_vector<PyObject*>;
|
|||||||
|
|
||||||
class Tuple {
|
class Tuple {
|
||||||
PyObject** _args;
|
PyObject** _args;
|
||||||
PyObject* _inlined[3];
|
PyObject* _inlined[2];
|
||||||
int _size;
|
int _size;
|
||||||
|
|
||||||
bool is_inlined() const { return _args == _inlined; }
|
bool is_inlined() const { return _args == _inlined; }
|
||||||
|
|
||||||
void _alloc(int n){
|
void _alloc(int n){
|
||||||
if(n <= 3){
|
if(n <= 2){
|
||||||
this->_args = _inlined;
|
this->_args = _inlined;
|
||||||
}else{
|
}else{
|
||||||
this->_args = (PyObject**)pool64.alloc(n * sizeof(void*));
|
this->_args = (PyObject**)pool64.alloc(n * sizeof(void*));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user