Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[sip] align pointer and reference in blacklisted files
this will facilitate sip diff checking
  • Loading branch information
3nids committed May 1, 2017
1 parent e581d46 commit 93971d5
Show file tree
Hide file tree
Showing 236 changed files with 1,842 additions and 1,842 deletions.
62 changes: 31 additions & 31 deletions python/core/conversions.sip
Expand Up @@ -41,12 +41,12 @@ template <TYPE>
if ((l = PyList_New(sipCpp->size())) == NULL)
return NULL;

const sipMappedType* qvector_qgspoint = sipFindMappedType("QVector<QgsPoint>");
const sipMappedType *qvector_qgspoint = sipFindMappedType("QVector<QgsPoint>");

// Set the list elements.
for (int i = 0; i < sipCpp->size(); ++i)
{
QVector<TYPE>* t = new QVector<TYPE>(sipCpp->at(i));
QVector<TYPE> *t = new QVector<TYPE>(sipCpp->at(i));
PyObject *tobj;

if ((tobj = sipConvertFromMappedType(t, qvector_qgspoint, sipTransferObj)) == NULL)
Expand All @@ -62,7 +62,7 @@ template <TYPE>
%End

%ConvertToTypeCode
const sipMappedType* qvector_qgspoint = sipFindMappedType("QVector<QgsPoint>");
const sipMappedType *qvector_qgspoint = sipFindMappedType("QVector<QgsPoint>");

// Check the type if that is all that is required.
if (sipIsErr == NULL)
Expand All @@ -84,7 +84,7 @@ template <TYPE>
{
int state;
//TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
QVector<TYPE> * t = reinterpret_cast< QVector<TYPE> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qvector_qgspoint, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
QVector<TYPE> *t = reinterpret_cast< QVector<TYPE> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qvector_qgspoint, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));

if (*sipIsErr)
{
Expand Down Expand Up @@ -118,12 +118,12 @@ template <TYPE>
if ((l = PyList_New(sipCpp->size())) == NULL)
return NULL;

const sipMappedType* qvector_qgspoint = sipFindMappedType("QVector<QVector<QgsPoint> >");
const sipMappedType *qvector_qgspoint = sipFindMappedType("QVector<QVector<QgsPoint> >");

// Set the list elements.
for (int i = 0; i < sipCpp->size(); ++i)
{
QVector<QVector<TYPE> >* t = new QVector<QVector<TYPE> >(sipCpp->at(i));
QVector<QVector<TYPE> > *t = new QVector<QVector<TYPE> >(sipCpp->at(i));
PyObject *tobj;

if ((tobj = sipConvertFromMappedType(t, qvector_qgspoint, sipTransferObj)) == NULL)
Expand All @@ -139,7 +139,7 @@ template <TYPE>

%ConvertToTypeCode

const sipMappedType* qvector_qgspoint = sipFindMappedType("QVector<QVector<QgsPoint> >");
const sipMappedType *qvector_qgspoint = sipFindMappedType("QVector<QVector<QgsPoint> >");

// Check the type if that is all that is required.
if (sipIsErr == NULL)
Expand All @@ -161,7 +161,7 @@ template <TYPE>
{
int state;
//TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
QVector<QVector<TYPE> > * t = reinterpret_cast< QVector< QVector<TYPE> > * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qvector_qgspoint, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
QVector<QVector<TYPE> > *t = reinterpret_cast< QVector< QVector<TYPE> > * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qvector_qgspoint, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));

if (*sipIsErr)
{
Expand Down Expand Up @@ -194,12 +194,12 @@ template <TYPE>
if ((l = PyList_New(sipCpp->size())) == NULL)
return NULL;

const sipMappedType* qlist_type = sipFindMappedType("QList<TYPE>");
const sipMappedType *qlist_type = sipFindMappedType("QList<TYPE>");

// Set the list elements.
for (int i = 0; i < sipCpp->size(); ++i)
{
QList<TYPE>* t = new QList<TYPE>(sipCpp->at(i));
QList<TYPE> *t = new QList<TYPE>(sipCpp->at(i));
PyObject *tobj;

if ((tobj = sipConvertFromMappedType(t, qlist_type, sipTransferObj)) == NULL)
Expand All @@ -215,7 +215,7 @@ template <TYPE>
%End

%ConvertToTypeCode
const sipMappedType* qlist_type = sipFindMappedType("QList<TYPE>");
const sipMappedType *qlist_type = sipFindMappedType("QList<TYPE>");

// Check the type if that is all that is required.
if (sipIsErr == NULL)
Expand All @@ -237,7 +237,7 @@ template <TYPE>
{
int state;
//TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
QList<TYPE> * t = reinterpret_cast< QList<TYPE> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qlist_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
QList<TYPE> *t = reinterpret_cast< QList<TYPE> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qlist_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));

if (*sipIsErr)
{
Expand Down Expand Up @@ -269,12 +269,12 @@ template <TYPE>
if ((l = PyList_New(sipCpp->size())) == NULL)
return NULL;

const sipMappedType* qlist_type = sipFindMappedType("QList<QgsPointV2>");
const sipMappedType *qlist_type = sipFindMappedType("QList<QgsPointV2>");

// Set the list elements.
for (int i = 0; i < sipCpp->size(); ++i)
{
QList<QgsPointV2>* t = new QList<QgsPointV2>(sipCpp->at(i));
QList<QgsPointV2> *t = new QList<QgsPointV2>(sipCpp->at(i));
PyObject *tobj;

if ((tobj = sipConvertFromMappedType(t, qlist_type, sipTransferObj)) == NULL)
Expand All @@ -290,7 +290,7 @@ template <TYPE>
%End

%ConvertToTypeCode
const sipMappedType* qlist_type = sipFindMappedType("QList<QgsPointV2>");
const sipMappedType *qlist_type = sipFindMappedType("QList<QgsPointV2>");

// Check the type if that is all that is required.
if (sipIsErr == NULL)
Expand All @@ -312,7 +312,7 @@ template <TYPE>
{
int state;
//TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
QList<QgsPointV2> * t = reinterpret_cast< QList<QgsPointV2> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qlist_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
QList<QgsPointV2> *t = reinterpret_cast< QList<QgsPointV2> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qlist_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));

if (*sipIsErr)
{
Expand Down Expand Up @@ -342,15 +342,15 @@ template <TYPE>
{
return NULL;
}
const sipMappedType* qlist_type = sipFindMappedType("QList<QList<QgsPointV2> >");
const sipMappedType *qlist_type = sipFindMappedType("QList<QList<QgsPointV2> >");
if(!qlist_type )
{
Py_DECREF(l); return NULL;
}

for (int i = 0; i < sipCpp->size(); ++i)
{
QList< QList<QgsPointV2> >* t = new QList<QList<QgsPointV2> >(sipCpp->at(i));
QList< QList<QgsPointV2> > *t = new QList<QList<QgsPointV2> >(sipCpp->at(i));
PyObject *tobj;
if ((tobj = sipConvertFromMappedType(t, qlist_type, sipTransferObj)) == NULL)
{
Expand All @@ -363,12 +363,12 @@ template <TYPE>
return l;
%End
%ConvertToTypeCode
const sipMappedType* qlist_type = sipFindMappedType("QList<QList<QgsPointV2> >");
const sipMappedType *qlist_type = sipFindMappedType("QList<QList<QgsPointV2> >");
if (sipIsErr == NULL)
{
return 0;
}
QList< QList< QList<QgsPointV2> > >* ql = new QList< QList< QList<QgsPointV2> > >();
QList< QList< QList<QgsPointV2> > > *ql = new QList< QList< QList<QgsPointV2> > >();
for( int i = 0;i < PyList_GET_SIZE(sipPy); ++i)
{
int state;
Expand Down Expand Up @@ -597,12 +597,12 @@ template<TYPE>
if ((d = PyDict_New()) == NULL)
return NULL;

const sipMappedType* qmap2 = sipFindMappedType("QMap<int, TYPE>");
const sipMappedType *qmap2 = sipFindMappedType("QMap<int, TYPE>");

// Set the list elements.
for (QMap<qint64, QMap<int, TYPE> >::iterator it = sipCpp->begin(); it != sipCpp->end(); ++it)
{
QMap<int, TYPE>* t = new QMap<int, TYPE>(*it);
QMap<int, TYPE> *t = new QMap<int, TYPE>(*it);

PyObject *kobj = PyLong_FromLongLong(it.key());
PyObject *tobj = sipConvertFromMappedType(t, qmap2, sipTransferObj);
Expand Down Expand Up @@ -677,7 +677,7 @@ template<TYPE>
int k2 = PyLong_AsLong(kobj2);
int state;

TYPE* t2 = reinterpret_cast<TYPE*>(sipConvertToType(tobj2, sipType_TYPE, sipTransferObj,SIP_NOT_NONE,&state,sipIsErr));
TYPE *t2 = reinterpret_cast<TYPE*>(sipConvertToType(tobj2, sipType_TYPE, sipTransferObj,SIP_NOT_NONE,&state,sipIsErr));

if (*sipIsErr)
{
Expand Down Expand Up @@ -1125,7 +1125,7 @@ template<double, TYPE>
for (i = sipCpp->begin(); i != sipCpp->end(); ++i)
{
PyObject *t1obj = PyFloat_FromDouble(i.key());
TYPE* t2 = &i.value();
TYPE *t2 = &i.value();
PyObject *t2obj = sipConvertFromType(t2, sipType_TYPE, sipTransferObj);

if (t1obj == NULL || t2obj == NULL || PyDict_SetItem(d, t1obj, t2obj) < 0)
Expand Down Expand Up @@ -1220,7 +1220,7 @@ template<double, TYPE2>
{

const double t1 = i.key();
TYPE2 * t2 = &i.value();
TYPE2 *t2 = &i.value();
PyObject *t1obj = PyFloat_FromDouble(t1);
PyObject *t2obj = sipConvertFromType(t2, sipType_TYPE2, sipTransferObj);
if (PyDict_GetItem(d, t1obj) == NULL) {
Expand Down Expand Up @@ -1337,7 +1337,7 @@ template<int, TYPE2*>
{

const int t1 = i.key();
TYPE2 * t2 = i.value();
TYPE2 *t2 = i.value();
PyObject *t1obj = PyLong_FromSize_t(t1);
PyObject *t2obj = sipConvertFromType(t2, sipType_TYPE2, sipTransferObj);
if (PyDict_GetItem(d, t1obj) == NULL)
Expand Down Expand Up @@ -1729,10 +1729,10 @@ template <TYPE>

for (QMap<qint64, QgsFeature*>::iterator it = sipCpp->begin(); it != sipCpp->end(); ++it)
{
QgsFeature* oobj = new QgsFeature(*it.value());
QgsFeature *oobj = new QgsFeature(*it.value());

PyObject* keyobj = PyLong_FromLong(it.key());
PyObject* pyOobj = sipConvertFromType(oobj, sipType_QgsFeature, sipTransferObj);
PyObject *keyobj = PyLong_FromLong(it.key());
PyObject *pyOobj = sipConvertFromType(oobj, sipType_QgsFeature, sipTransferObj);
PyDict_SetItem(d, keyobj, pyOobj);

if(pyOobj == NULL || keyobj == NULL || PyDict_SetItem(d, keyobj, pyOobj) < 0)
Expand Down Expand Up @@ -1767,7 +1767,7 @@ template <TYPE>
{
int state;
qint64 t1 = PyLong_AsLongLong(t1obj);
QgsFeature* t2 = reinterpret_cast<QgsFeature*>(sipConvertToType(t2obj, sipType_QgsFeature, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
QgsFeature *t2 = reinterpret_cast<QgsFeature*>(sipConvertToType(t2obj, sipType_QgsFeature, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));

if (*sipIsErr)
{
Expand Down Expand Up @@ -1906,7 +1906,7 @@ bool null_from_qvariant_converter( const QVariant *varp, PyObject **objp )
if ( varp->isNull() && varp->type() != QVariant::ByteArray )
{
sWatchDog = true;
PyObject* vartype = sipConvertFromEnum( varp->type(), sipType_QVariant_Type );
PyObject *vartype = sipConvertFromEnum( varp->type(), sipType_QVariant_Type );
*objp = PyObject_Call(( PyObject * )sipTypeAsPyTypeObject( sipType_QVariant ), PyTuple_Pack( 1, vartype ), nullptr );
sWatchDog = false;
return true;
Expand Down
10 changes: 5 additions & 5 deletions python/core/qgis.sip
Expand Up @@ -37,7 +37,7 @@ class Qgis
// Release name
static const QString QGIS_RELEASE_NAME;
// The development version
static const char* QGIS_DEV_VERSION;
static const char *QGIS_DEV_VERSION;

// Enumerations
//
Expand Down Expand Up @@ -112,7 +112,7 @@ class Qgis
* @note added in version 2.9
* @see permissiveToInt
*/
double qgsPermissiveToDouble( QString string, bool& ok );
double qgsPermissiveToDouble( QString string, bool &ok );

/** Converts a string to an integer in a permissive way, e.g., allowing for incorrect
* numbers of digits between thousand separators
Expand All @@ -122,18 +122,18 @@ double qgsPermissiveToDouble( QString string, bool& ok );
* @note added in version 2.9
* @see permissiveToDouble
*/
int qgsPermissiveToInt( QString string, bool& ok );
int qgsPermissiveToInt( QString string, bool &ok );
//! Compares two QVariant values and returns whether the first is less than the second.
//! Useful for sorting lists of variants, correctly handling sorting of the various
//! QVariant data types (such as strings, numeric values, dates and times)
//! @see qgsVariantGreaterThan()
bool qgsVariantLessThan( const QVariant& lhs, const QVariant& rhs );
bool qgsVariantLessThan( const QVariant &lhs, const QVariant &rhs );

//! Compares two QVariant values and returns whether the first is greater than the second.
//! Useful for sorting lists of variants, correctly handling sorting of the various
//! QVariant data types (such as strings, numeric values, dates and times)
//! @see qgsVariantLessThan()
bool qgsVariantGreaterThan( const QVariant& lhs, const QVariant& rhs );
bool qgsVariantGreaterThan( const QVariant &lhs, const QVariant &rhs );

/** Wkt string that represents a geographic coord sys
* @note added to replace GEOWkt
Expand Down
10 changes: 5 additions & 5 deletions python/core/qgscachedfeatureiterator.sip
Expand Up @@ -11,7 +11,7 @@ class QgsCachedFeatureIterator : QgsAbstractFeatureIterator
* @param vlCache The vector layer cache to use
* @param featureRequest The feature request to answer
*/
QgsCachedFeatureIterator( QgsVectorLayerCache* vlCache, const QgsFeatureRequest& featureRequest );
QgsCachedFeatureIterator( QgsVectorLayerCache *vlCache, const QgsFeatureRequest &featureRequest );

/**
* Rewind to the beginning of the iterator
Expand All @@ -37,15 +37,15 @@ class QgsCachedFeatureIterator : QgsAbstractFeatureIterator
*
* @see bool getFeature( QgsFeature& f )
*/
virtual bool fetchFeature( QgsFeature& f );
virtual bool fetchFeature( QgsFeature &f );

/**
* We have a local special iterator for FilterFids, no need to run the generic.
*
* @param f Will write to this feature
* @return bool true if the operation was ok
*/
virtual bool nextFeatureFilterFids( QgsFeature& f );
virtual bool nextFeatureFilterFids( QgsFeature &f );

};

Expand All @@ -66,7 +66,7 @@ class QgsCachedFeatureWriterIterator : QgsAbstractFeatureIterator
* @param vlCache The vector layer cache to use
* @param featureRequest The feature request to answer
*/
QgsCachedFeatureWriterIterator( QgsVectorLayerCache* vlCache, const QgsFeatureRequest& featureRequest );
QgsCachedFeatureWriterIterator( QgsVectorLayerCache *vlCache, const QgsFeatureRequest &featureRequest );

/**
* Rewind to the beginning of the iterator