50 PyObject *sipTransferObj,
51 int *&sipIsErr, T **&sipCppPtr )
56 if( sipCanConvertToType( sipPy, siptype,
57 SIP_NOT_NONE | SIP_NO_CONVERTORS ) )
59 if( PyObject_HasAttrString( sipPy,
"internalRep" ) )
61 PyObject *internalRep = PyObject_GetAttrString( sipPy,
"internalRep" );
64 bool x = sipCanConvertToType( internalRep, siptype,
65 SIP_NOT_NONE | SIP_NO_CONVERTORS );
66 Py_DECREF( internalRep );
73 if( sipPy == Py_None )
82 if( sipCanConvertToType( sipPy, siptype, SIP_NO_CONVERTORS ) )
84 sipConvertToType( sipPy, siptype, sipTransferObj,
85 SIP_NO_CONVERTORS, &state, sipIsErr );
86 if( !obj && PyObject_HasAttrString( sipPy,
"internalRep" ) )
88 PyObject *internalRep = PyObject_GetAttrString( sipPy,
"internalRep" );
92 sipConvertToType( internalRep, siptype, sipTransferObj,
93 SIP_NO_CONVERTORS, &state, sipIsErr );
94 Py_DECREF( internalRep );
97 if( *sipIsErr && obj )
99 sipReleaseType( obj, sipType_anatomist_Referential, state );