diff options
Diffstat (limited to 'sources')
-rw-r--r-- | sources/shiboken6/libshiboken/bindingmanager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sources/shiboken6/libshiboken/bindingmanager.cpp b/sources/shiboken6/libshiboken/bindingmanager.cpp index 3aea677bd..e4c6c2320 100644 --- a/sources/shiboken6/libshiboken/bindingmanager.cpp +++ b/sources/shiboken6/libshiboken/bindingmanager.cpp @@ -298,12 +298,13 @@ PyObject *BindingManager::getOverride(const void *cptr, // They cannot be overridden (make that sure by the metaclass). return nullptr; } - PyObject *pyMethodName = nameCache[(flag & 1) != 0]; // borrowed + bool is_snake = flag & 0x01; + PyObject *pyMethodName = nameCache[is_snake]; // borrowed if (pyMethodName == nullptr) { if (propFlag) methodName += 2; // skip the propFlag and ':' - pyMethodName = Shiboken::String::getSnakeCaseName(methodName, flag); - nameCache[(flag & 1) != 0] = pyMethodName; + pyMethodName = Shiboken::String::getSnakeCaseName(methodName, is_snake); + nameCache[is_snake] = pyMethodName; } if (wrapper->ob_dict) { |