We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc3be9a commit 01bc776Copy full SHA for 01bc776
src/module.cpp
@@ -1854,9 +1854,7 @@ namespace py3lm {
1854
return;
1855
}
1856
1857
- const bool hasRefParams = refParamsCount != 0;
1858
-
1859
- if (hasRefParams) {
+ if (refParamsCount != 0) {
1860
if (!PyTuple_CheckExact(result)) {
1861
SetTypeError("Expected tuple as return value", result);
1862
@@ -1899,7 +1897,7 @@ namespace py3lm {
1899
1897
1900
1898
1901
1902
- PyObject* const returnObject = hasRefParams ? PyTuple_GET_ITEM(result, Py_ssize_t{ 0 }) : result;
+ PyObject* const returnObject = refParamsCount != 0 ? PyTuple_GET_ITEM(result, Py_ssize_t{ 0 }) : result;
1903
1904
if (!SetReturn(returnObject, retType, ret)) {
1905
if (PyErr_Occurred()) {
0 commit comments