Skip to content

Commit ed33ef1

Browse files
committed
Revert "do not adjust for self if a templated method is static"
This reverts commit 924e399.
1 parent 0eee679 commit ed33ef1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/TemplateProxy.cxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,9 @@ PyObject* TemplateProxy::Instantiate(const std::string& fname,
7676
std::string proto = "";
7777

7878
#if PY_VERSION_HEX >= 0x03080000
79-
// adjust arguments for self if this is a rebound (global) function
79+
// adjust arguments for self if this is a rebound global function
8080
bool isNS = (((CPPScope*)fTI->fPyClass)->fFlags & CPPScope::kIsNamespace);
81-
if (!isNS && CPyCppyy_PyArgs_GET_SIZE(args, nargsf) && \
82-
(!fSelf ||
83-
(fSelf == Py_None && !Cppyy::IsStaticTemplate(((CPPScope*)fTI->fPyClass)->fCppType, fname)))) {
81+
if (!isNS && !fSelf && CPyCppyy_PyArgs_GET_SIZE(args, nargsf)) {
8482
args += 1;
8583
nargsf -= 1;
8684
}

0 commit comments

Comments
 (0)