Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions bindings/pyroot/cppyy/CPyCppyy/src/CPPScope.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,8 @@ static PyObject* meta_getattro(PyObject* pyclass, PyObject* pyname)
Cppyy::TCppType_t tcl = Cppyy::GetScope(clean);
if (tcl) {
typedefpointertoclassobject* tpc =
PyObject_GC_New(typedefpointertoclassobject, &TypedefPointerToClass_Type);
PyObject_New(typedefpointertoclassobject, &TypedefPointerToClass_Type);
tpc->fCppType = tcl;
tpc->fDict = PyDict_New();
attr = (PyObject*)tpc;
}
}
Expand Down
2 changes: 1 addition & 1 deletion bindings/pyroot/cppyy/CPyCppyy/src/CustomPyTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ PyTypeObject TypedefPointerToClass_Type = {
0, // tp_dict
0, // tp_descr_get
0, // tp_descr_set
offsetof(typedefpointertoclassobject, fDict), // tp_dictoffset
0, // tp_dictoffset
0, // tp_init
0, // tp_alloc
0, // tp_new
Expand Down
5 changes: 0 additions & 5 deletions bindings/pyroot/cppyy/CPyCppyy/src/CustomPyTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ inline bool RefInt_CheckExact(T* object)
struct typedefpointertoclassobject {
PyObject_HEAD
Cppyy::TCppType_t fCppType;
PyObject* fDict;

~typedefpointertoclassobject() {
Py_DECREF(fDict);
}
};

extern PyTypeObject TypedefPointerToClass_Type;
Expand Down
Loading