From ce0b710c07594219e66e71c1c464241be399ffc9 Mon Sep 17 00:00:00 2001 From: Vipul Cariappa Date: Tue, 29 Oct 2024 06:54:10 +0000 Subject: [PATCH] fix for cling --- src/CPPScope.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CPPScope.cxx b/src/CPPScope.cxx index e6c86c6..013e63c 100644 --- a/src/CPPScope.cxx +++ b/src/CPPScope.cxx @@ -431,6 +431,8 @@ static PyObject* meta_getattro(PyObject* pyclass, PyObject* pyname) if (attr) { // cache the result if (CPPDataMember_Check(attr)) { + if (Cppyy::IsClass(scope)) + PyType_Type.tp_setattro(pyclass, pyname, attr); PyType_Type.tp_setattro((PyObject*)Py_TYPE(pyclass), pyname, attr); Py_DECREF(attr);