You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most likely a memory leak: Use sipConvertFromNewInstance to transfer ownership to python and make sure it gets deleted properly in any other path ( like v->IsNull() )
Code has comments. Press enter to view.
26
26
PyObject *tobj;
27
27
28
-
if ( v.isNull() )
28
+
if ( v->isNull() )
29
29
{
30
30
tobj = Py_None;
31
31
}
32
-
else if ((tobj = sipConvertFromType(&v, sipType_QVariant,Py_None)) == NULL)
32
+
else if ((tobj = sipConvertFromType(v, sipType_QVariant,Py_None)) == NULL)
Hi Nathan,
just compiled under Linux I am getting:
[ 88%] Building CXX object python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart3.cpp.o
/home/sam/pacchetti_gis/Quantum-GIS/python/core/qgsfeature.sip: In function ‘PyObject* meth_QgsFeature___getattr__(PyObject*, PyObject*)’:
/home/sam/pacchetti_gis/Quantum-GIS/python/core/qgsfeature.sip:124:47: error: invalid initialization of non-const reference of type ‘QVariant&’ from an rvalue of type ‘QVariant’
/home/sam/pacchetti_gis/Quantum-GIS/python/core/qgsfeature.sip:132:50: error: invalid initialization of non-const reference of type ‘QVariant&’ from an rvalue of type ‘QVariant’
/home/sam/pacchetti_gis/Quantum-GIS/python/core/qgsfeature.sip: In function ‘PyObject* meth_QgsFeature_attribute(PyObject*, PyObject*)’:
/home/sam/pacchetti_gis/Quantum-GIS/python/core/qgsfeature.sip:466:45: error: invalid initialization of non-const reference of type ‘QVariant&’ from an rvalue of type ‘QVariant’
/home/sam/pacchetti_gis/Quantum-GIS/python/core/qgsfeature.sip: In function ‘PyObject* slot_QgsFeature___getitem__(PyObject*, PyObject*)’:
/home/sam/pacchetti_gis/Quantum-GIS/python/core/qgsfeature.sip:221:45: error: invalid initialization of non-const reference of type ‘QVariant&’ from an rvalue of type ‘QVariant’
make[2]: *** [python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart3.cpp.o] Error 1
make[1]: *** [python/CMakeFiles/python_module_qgis_core.dir/all] Error 2
make: *** [all] Error 2
1 commit comments
slarosa commentedon Jun 11, 2013
Hi Nathan,
just compiled under Linux I am getting: