diff --git a/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx b/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx index 0a8bce369233f..ea7e1abed246b 100644 --- a/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx +++ b/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx @@ -203,24 +203,6 @@ static bool IsPyCArgObject(PyObject* pyobject) return Py_TYPE(pyobject) == pycarg_type; } -static bool IsCTypesArrayOrPointer(PyObject* pyobject) -{ - static PyTypeObject* cstgdict_type = nullptr; - if (!cstgdict_type) { - // get any pointer type to initialize the extended dictionary type - PyTypeObject* ct_int = GetCTypesType(ct_c_int); - if (ct_int && ct_int->tp_dict) { - cstgdict_type = Py_TYPE(ct_int->tp_dict); - } - } - - PyTypeObject* pytype = Py_TYPE(pyobject); - if (pytype->tp_dict && Py_TYPE(pytype->tp_dict) == cstgdict_type) - return true; - return false; -} - - //- helper to establish life lines ------------------------------------------- static inline bool SetLifeLine(PyObject* holder, PyObject* target, intptr_t ref) { @@ -1506,16 +1488,6 @@ bool CPyCppyy::VoidArrayConverter::SetArg( return true; } -// allow any other ctypes pointer type - if (IsCTypesArrayOrPointer(pyobject)) { - void** payload = (void**)((CPyCppyy_tagCDataObject*)pyobject)->b_ptr; - if (payload) { - para.fValue.fVoidp = *payload; - para.fTypeCode = 'p'; - return true; - } - } - // final try: attempt to get buffer Py_ssize_t buflen = Utility::GetBuffer(pyobject, '*', 1, para.fValue.fVoidp, false); @@ -1628,11 +1600,6 @@ bool CPyCppyy::name##ArrayConverter::SetArg( \ para.fValue.fVoidp = (void*)((CPyCppyy_tagCDataObject*)pyobject)->b_ptr;\ para.fTypeCode = 'p'; \ convOk = true; \ - } else if (Py_TYPE(pyobject) == GetCTypesType(ct_c_void_p)) { \ - /* special case: pass address of c_void_p buffer to return the address */\ - para.fValue.fVoidp = (void*)((CPyCppyy_tagCDataObject*)pyobject)->b_ptr;\ - para.fTypeCode = 'p'; \ - convOk = true; \ } else if (LowLevelView_Check(pyobject) && \ ((LowLevelView*)pyobject)->fBufInfo.ndim == 2 && \ strchr(((LowLevelView*)pyobject)->fBufInfo.format, code)) { \