* Fixed compiler warnings concerning the lack of a newline at the

end of a file.

* Fixed compiler warnings due to an invalid argument to PyList_New().
NULL was used instead of 0 to create an empty list.
This commit is contained in:
2009-10-15 19:38:45 +00:00
parent 3c7d54b38a
commit 94711098e4
21 changed files with 24 additions and 25 deletions

View File

@@ -177,7 +177,7 @@ PyObject * SShape_bbox( BPy_SShape *self ) {
PyObject * SShape_getVertexList( BPy_SShape *self ) {
PyObject *py_vertices = PyList_New(NULL);
PyObject *py_vertices = PyList_New(0);
vector< SVertex * > vertices = self->ss->getVertexList();
vector< SVertex * >::iterator it;
@@ -191,7 +191,7 @@ PyObject * SShape_getVertexList( BPy_SShape *self ) {
PyObject * SShape_getEdgeList( BPy_SShape *self ) {
PyObject *py_edges = PyList_New(NULL);
PyObject *py_edges = PyList_New(0);
vector< FEdge * > edges = self->ss->getEdgeList();
vector< FEdge * >::iterator it;

View File

@@ -142,7 +142,7 @@ PyObject * ViewShape_sshape( BPy_ViewShape *self ) {
PyObject * ViewShape_vertices( BPy_ViewShape *self ) {
PyObject *py_vertices = PyList_New(NULL);
PyObject *py_vertices = PyList_New(0);
vector< ViewVertex * > vertices = self->vs->vertices();
vector< ViewVertex * >::iterator it;
@@ -156,7 +156,7 @@ PyObject * ViewShape_vertices( BPy_ViewShape *self ) {
PyObject * ViewShape_edges( BPy_ViewShape *self ) {
PyObject *py_edges = PyList_New(NULL);
PyObject *py_edges = PyList_New(0);
vector< ViewEdge * > edges = self->vs->edges();
vector< ViewEdge * >::iterator it;

View File

@@ -133,7 +133,7 @@ PyObject * SVertex_normals( BPy_SVertex *self ) {
PyObject *py_normals;
set< Vec3r > normals;
py_normals = PyList_New(NULL);
py_normals = PyList_New(0);
normals = self->sv->normals();
for( set< Vec3r >::iterator set_iterator = normals.begin(); set_iterator != normals.end(); set_iterator++ ) {

View File

@@ -72,4 +72,3 @@ int GuidingLinesShader___init__( BPy_GuidingLinesShader* self, PyObject *args)
#ifdef __cplusplus
}
#endif

View File

@@ -139,7 +139,7 @@ PyObject * UnaryFunction0DVectorViewShape___call__( BPy_UnaryFunction0DVectorVie
}
return NULL;
}
PyObject *list = PyList_New(NULL);
PyObject *list = PyList_New(0);
for( unsigned int i = 0; i < self->uf0D_vectorviewshape->result.size(); i++)
PyList_Append(list, BPy_ViewShape_from_ViewShape(*( self->uf0D_vectorviewshape->result[i] )) );

View File

@@ -166,7 +166,7 @@ PyObject * UnaryFunction1DVectorViewShape___call__( BPy_UnaryFunction1DVectorVie
}
return NULL;
}
PyObject *list = PyList_New(NULL);
PyObject *list = PyList_New(0);
for( unsigned int i = 0; i < self->uf1D_vectorviewshape->result.size(); i++)
PyList_Append(list, BPy_ViewShape_from_ViewShape(*( self->uf1D_vectorviewshape->result[i] )) );