From 527f543cf05dc20c42511895d6c70f503d08c42e Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sun, 5 Feb 2023 02:58:54 +0800 Subject: [PATCH] up --- plugins/flutter/src/pocketpy.h | 14 +++++++------- plugins/godot/godot-cpp | 2 +- src/obj.h | 2 +- src/vm.h | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/plugins/flutter/src/pocketpy.h b/plugins/flutter/src/pocketpy.h index e367c131..31855c31 100644 --- a/plugins/flutter/src/pocketpy.h +++ b/plugins/flutter/src/pocketpy.h @@ -2869,7 +2869,7 @@ struct Function { } }; -struct _BoundedMethod { +struct _BoundMethod { PyVar obj; PyVar method; }; @@ -4188,8 +4188,8 @@ public: } const PyVar* callable = &_callable; - if((*callable)->is_type(_tp_bounded_method)){ - auto& bm = PyBoundedMethod_AS_C((*callable)); + if((*callable)->is_type(_tp_bound_method)){ + auto& bm = PyBoundMethod_AS_C((*callable)); callable = &bm.method; // get unbound method args.extend_self(bm.obj); } @@ -4381,7 +4381,7 @@ public: if(it != cls->attribs.end()){ PyVar valueFromCls = it->second; if(valueFromCls->is_type(_tp_function) || valueFromCls->is_type(_tp_native_function)){ - return PyBoundedMethod({obj, std::move(valueFromCls)}); + return PyBoundMethod({obj, std::move(valueFromCls)}); }else{ return valueFromCls; } @@ -4524,7 +4524,7 @@ public: // for quick access PyVar _tp_object, _tp_type, _tp_int, _tp_float, _tp_bool, _tp_str; PyVar _tp_list, _tp_tuple; - PyVar _tp_function, _tp_native_function, _tp_native_iterator, _tp_bounded_method; + PyVar _tp_function, _tp_native_function, _tp_native_iterator, _tp_bound_method; PyVar _tp_slice, _tp_range, _tp_module, _tp_ref; PyVar _tp_super; @@ -4553,7 +4553,7 @@ public: DEF_NATIVE(Function, _Func, _tp_function) DEF_NATIVE(NativeFunction, _CppFunc, _tp_native_function) DEF_NATIVE(Iter, _Iterator, _tp_native_iterator) - DEF_NATIVE(BoundedMethod, _BoundedMethod, _tp_bounded_method) + DEF_NATIVE(BoundMethod, _BoundMethod, _tp_bound_method) DEF_NATIVE(Range, _Range, _tp_range) DEF_NATIVE(Slice, _Slice, _tp_slice) @@ -4582,7 +4582,7 @@ public: _tp_function = new_type_object("function"); _tp_native_function = new_type_object("_native_function"); _tp_native_iterator = new_type_object("_native_iterator"); - _tp_bounded_method = new_type_object("_bounded_method"); + _tp_bound_method = new_type_object("bound_method"); _tp_super = new_type_object("super"); this->None = new_object(new_type_object("NoneType"), DUMMY_VAL); diff --git a/plugins/godot/godot-cpp b/plugins/godot/godot-cpp index cc16bce7..ae3cd03d 160000 --- a/plugins/godot/godot-cpp +++ b/plugins/godot/godot-cpp @@ -1 +1 @@ -Subproject commit cc16bce7a9f26fe305ecf30a5aa00697286b2844 +Subproject commit ae3cd03dfd04c5a9b3d9178ee9562d9d8c15db74 diff --git a/src/obj.h b/src/obj.h index ae0ad7ac..f780bd2e 100644 --- a/src/obj.h +++ b/src/obj.h @@ -36,7 +36,7 @@ struct Function { } }; -struct _BoundedMethod { +struct _BoundMethod { PyVar obj; PyVar method; }; diff --git a/src/vm.h b/src/vm.h index 2049230c..45dd41b3 100644 --- a/src/vm.h +++ b/src/vm.h @@ -446,8 +446,8 @@ public: } const PyVar* callable = &_callable; - if((*callable)->is_type(_tp_bounded_method)){ - auto& bm = PyBoundedMethod_AS_C((*callable)); + if((*callable)->is_type(_tp_bound_method)){ + auto& bm = PyBoundMethod_AS_C((*callable)); callable = &bm.method; // get unbound method args.extend_self(bm.obj); } @@ -656,7 +656,7 @@ public: if(it != cls->attribs.end()){ PyVar valueFromCls = it->second; if(valueFromCls->is_type(_tp_function) || valueFromCls->is_type(_tp_native_function)){ - return PyBoundedMethod({obj, std::move(valueFromCls)}); + return PyBoundMethod({obj, std::move(valueFromCls)}); }else{ return valueFromCls; } @@ -799,7 +799,7 @@ public: // for quick access PyVar _tp_object, _tp_type, _tp_int, _tp_float, _tp_bool, _tp_str; PyVar _tp_list, _tp_tuple; - PyVar _tp_function, _tp_native_function, _tp_native_iterator, _tp_bounded_method; + PyVar _tp_function, _tp_native_function, _tp_native_iterator, _tp_bound_method; PyVar _tp_slice, _tp_range, _tp_module, _tp_ref; PyVar _tp_super, _tp_exception; @@ -828,7 +828,7 @@ public: DEF_NATIVE(Function, _Func, _tp_function) DEF_NATIVE(NativeFunction, _CppFunc, _tp_native_function) DEF_NATIVE(Iter, _Iterator, _tp_native_iterator) - DEF_NATIVE(BoundedMethod, _BoundedMethod, _tp_bounded_method) + DEF_NATIVE(BoundMethod, _BoundMethod, _tp_bound_method) DEF_NATIVE(Range, _Range, _tp_range) DEF_NATIVE(Slice, _Slice, _tp_slice) DEF_NATIVE(Exception, _Exception, _tp_exception) @@ -857,7 +857,7 @@ public: _tp_function = new_type_object("function"); _tp_native_function = new_type_object("_native_function"); _tp_native_iterator = new_type_object("_native_iterator"); - _tp_bounded_method = new_type_object("_bounded_method"); + _tp_bound_method = new_type_object("bound_method"); _tp_super = new_type_object("super"); _tp_exception = new_type_object("Exception");