Skip to content

Commit 098f455

Browse files
Vipul-Cariappaaaronj0
authored andcommitted
fix: use GetNamed with Namespace instead of CheckDatamember
1 parent b3caeca commit 098f455

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CPPScope.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ static int meta_setattro(PyObject* pyclass, PyObject* pyname, PyObject* pyval)
535535
// skip if the given pyval is a descriptor already, or an unassignable class
536536
if (!CPyCppyy::CPPDataMember_Check(pyval) && !CPyCppyy::CPPScope_Check(pyval)) {
537537
std::string name = CPyCppyy_PyText_AsString(pyname);
538-
if (Cppyy::CheckDatamember(((CPPScope*)pyclass)->fCppType, name))
538+
if (Cppyy::GetNamed(name, ((CPPScope*)pyclass)->fCppType))
539539
meta_getattro(pyclass, pyname); // triggers creation
540540
}
541541
}

0 commit comments

Comments
 (0)