mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-21 12:00:18 +00:00
some fix
This commit is contained in:
parent
bd364d9967
commit
766bf5fa34
@ -21,7 +21,6 @@ struct Tuple {
|
||||
|
||||
Tuple(PyVar, PyVar);
|
||||
Tuple(PyVar, PyVar, PyVar);
|
||||
Tuple(PyVar, PyVar, PyVar, PyVar);
|
||||
|
||||
bool is_inlined() const { return _args == _inlined; }
|
||||
PyVar& operator[](int i){ return _args[i]; }
|
||||
|
@ -350,7 +350,12 @@ struct Array2d{
|
||||
int width = right - left + 1;
|
||||
int height = bottom - top + 1;
|
||||
if(width <= 0 || height <= 0) return vm->None;
|
||||
return VAR(Tuple(VAR(left), VAR(top), VAR(width), VAR(height)));
|
||||
Tuple t(4);
|
||||
t[0] = VAR(left);
|
||||
t[1] = VAR(top);
|
||||
t[2] = VAR(width);
|
||||
t[3] = VAR(height);
|
||||
return VAR(std::move(t));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -38,13 +38,6 @@ Tuple::Tuple(PyVar _0, PyVar _1, PyVar _2): Tuple(3){
|
||||
_args[2] = _2;
|
||||
}
|
||||
|
||||
Tuple::Tuple(PyVar _0, PyVar _1, PyVar _2, PyVar _3): Tuple(4){
|
||||
_args[0] = _0;
|
||||
_args[1] = _1;
|
||||
_args[2] = _2;
|
||||
_args[3] = _3;
|
||||
}
|
||||
|
||||
Tuple::~Tuple(){ if(!is_inlined()) free(_args); }
|
||||
|
||||
List ArgsView::to_list() const{
|
||||
|
Loading…
x
Reference in New Issue
Block a user