diff --git a/plugins/flutter/src/pocketpy.h b/plugins/flutter/src/pocketpy.h index 57f16359..a0b5679c 100644 --- a/plugins/flutter/src/pocketpy.h +++ b/plugins/flutter/src/pocketpy.h @@ -3874,17 +3874,17 @@ public: return v; } - inline void __deref(VM*, PyVar&); + inline void try_deref(VM*, PyVar&); inline PyVar popValue(VM* vm){ PyVar value = __pop(); - __deref(vm, value); + try_deref(vm, value); return value; } inline PyVar topValue(VM* vm){ PyVar value = __top(); - __deref(vm, value); + try_deref(vm, value); return value; } @@ -3895,7 +3895,7 @@ public: inline PyVar __topValueN(VM* vm, int n=-1){ PyVar value = s_data[s_data.size() + n]; - __deref(vm, value); + try_deref(vm, value); return value; } @@ -3935,7 +3935,7 @@ public: pkpy::ArgList v(n); for(int i=n-1; i>=0; i--){ v._index(i) = std::move(s_data[new_size + i]); - __deref(vm, v._index(i)); + try_deref(vm, v._index(i)); } s_data.resize(new_size); return v; @@ -4038,7 +4038,7 @@ protected: if(!items[i]->isType(_tp_ref)) { done = true; PyVarList values = items.toList(); - for(int j=i; j__deref(this, values[j]); + for(int j=i; jtry_deref(this, values[j]); frame->push(PyTuple(values)); break; } @@ -4223,7 +4223,7 @@ protected: } break; case OP_FOR_ITER: { - // __top() must be PyIter, so no need to __deref() + // __top() must be PyIter, so no need to try_deref() auto& it = PyIter_AS_C(frame->__top()); if(it->hasNext()){ PyRef_AS_C(it->var)->set(this, frame, it->next()); @@ -5029,7 +5029,7 @@ void TupleRef::del(VM* vm, Frame* frame) const{ } /***** Frame's Impl *****/ -inline void Frame::__deref(VM* vm, PyVar& v){ +inline void Frame::try_deref(VM* vm, PyVar& v){ if(v->isType(vm->_tp_ref)) v = vm->PyRef_AS_C(v)->get(vm, this); } diff --git a/plugins/godot/godot-cpp b/plugins/godot/godot-cpp index f3f4cdf6..02647b67 160000 --- a/plugins/godot/godot-cpp +++ b/plugins/godot/godot-cpp @@ -1 +1 @@ -Subproject commit f3f4cdf6ceeaad710e1b376ee1f6c739cb48b125 +Subproject commit 02647b679b993663b4e1919db6e5e40d45e8ed99 diff --git a/src/codeobject.h b/src/codeobject.h index 8ee7f9ad..4cfc06c4 100644 --- a/src/codeobject.h +++ b/src/codeobject.h @@ -194,17 +194,17 @@ public: return v; } - inline void __deref(VM*, PyVar&); + inline void try_deref(VM*, PyVar&); inline PyVar popValue(VM* vm){ PyVar value = __pop(); - __deref(vm, value); + try_deref(vm, value); return value; } inline PyVar topValue(VM* vm){ PyVar value = __top(); - __deref(vm, value); + try_deref(vm, value); return value; } @@ -215,7 +215,7 @@ public: inline PyVar __topValueN(VM* vm, int n=-1){ PyVar value = s_data[s_data.size() + n]; - __deref(vm, value); + try_deref(vm, value); return value; } @@ -255,7 +255,7 @@ public: pkpy::ArgList v(n); for(int i=n-1; i>=0; i--){ v._index(i) = std::move(s_data[new_size + i]); - __deref(vm, v._index(i)); + try_deref(vm, v._index(i)); } s_data.resize(new_size); return v; diff --git a/src/vm.h b/src/vm.h index aeb54b4f..904e0859 100644 --- a/src/vm.h +++ b/src/vm.h @@ -87,7 +87,7 @@ protected: if(!items[i]->isType(_tp_ref)) { done = true; PyVarList values = items.toList(); - for(int j=i; j__deref(this, values[j]); + for(int j=i; jtry_deref(this, values[j]); frame->push(PyTuple(values)); break; } @@ -272,7 +272,7 @@ protected: } break; case OP_FOR_ITER: { - // __top() must be PyIter, so no need to __deref() + // __top() must be PyIter, so no need to try_deref() auto& it = PyIter_AS_C(frame->__top()); if(it->hasNext()){ PyRef_AS_C(it->var)->set(this, frame, it->next()); @@ -1078,7 +1078,7 @@ void TupleRef::del(VM* vm, Frame* frame) const{ } /***** Frame's Impl *****/ -inline void Frame::__deref(VM* vm, PyVar& v){ +inline void Frame::try_deref(VM* vm, PyVar& v){ if(v->isType(vm->_tp_ref)) v = vm->PyRef_AS_C(v)->get(vm, this); }