diff options
author | Jean-Luc Peurière <jlp@nerim.net> | 2005-03-09 22:45:59 +0300 |
---|---|---|
committer | Jean-Luc Peurière <jlp@nerim.net> | 2005-03-09 22:45:59 +0300 |
commit | c78e44cdc563853c250da78ee78ba622c39126b2 (patch) | |
tree | fb116af7e1edd94ef96ae883bea727be372e2bd2 /source/blender/python/api2_2x/matrix.c | |
parent | 77d44e88e95d86661fc8b29db923083ec747cf9d (diff) |
big warning hunt commit
lot of casts, added prototypes, missing includes and some true errors
Diffstat (limited to 'source/blender/python/api2_2x/matrix.c')
-rw-r--r-- | source/blender/python/api2_2x/matrix.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/python/api2_2x/matrix.c b/source/blender/python/api2_2x/matrix.c index 33dc4da49b6..82391c0c9e5 100644 --- a/source/blender/python/api2_2x/matrix.c +++ b/source/blender/python/api2_2x/matrix.c @@ -341,7 +341,7 @@ PyObject *Matrix_Invert( MatrixObject * self ) self->matrix[2][0], self->matrix[2][1], self->matrix[2][2] ); } else if( self->rowSize == 4 ) { - det = Det4x4( *self->matrix ); + det = Det4x4( (float ( * )[4]) *self->matrix ); } else { return EXPP_ReturnPyObjError( PyExc_StandardError, "error calculating determinant for inverse()\n" ); @@ -370,7 +370,7 @@ PyObject *Matrix_Invert( MatrixObject * self ) ( PyExc_MemoryError, "problem allocating mat\n\n" ) ); } - Mat3Adj( ( float ( * )[3] ) mat, *self->matrix ); + Mat3Adj( ( float ( * )[3] ) mat,( float ( * )[3] ) *self->matrix ); } else if( self->rowSize == 4 ) { mat = PyMem_Malloc( self->rowSize * self->colSize * sizeof( float ) ); @@ -379,7 +379,7 @@ PyObject *Matrix_Invert( MatrixObject * self ) ( PyExc_MemoryError, "problem allocating mat\n\n" ) ); } - Mat4Adj( ( float ( * )[4] ) mat, *self->matrix ); + Mat4Adj( ( float ( * )[4] ) mat, ( float ( * )[4] ) *self->matrix ); } //divide by determinate for( x = 0; x < ( self->rowSize * self->colSize ); x++ ) { @@ -437,7 +437,7 @@ PyObject *Matrix_Determinant( MatrixObject * self ) self->matrix[2][0], self->matrix[2][1], self->matrix[2][2] ); } else if( self->rowSize == 4 ) { - det = Det4x4( *self->matrix ); + det = Det4x4( (float ( * )[4]) *self->matrix ); } else { return EXPP_ReturnPyObjError( PyExc_StandardError, "error in determinant()\n" ); @@ -458,9 +458,9 @@ PyObject *Matrix_Transpose( MatrixObject * self ) self->matrix[1][0] = self->matrix[0][1]; self->matrix[0][1] = t; } else if( self->rowSize == 3 ) { - Mat3Transp( *self->matrix ); + Mat3Transp( (float ( * )[3])*self->matrix ); } else if( self->rowSize == 4 ) { - Mat4Transp( *self->matrix ); + Mat4Transp( (float ( * )[4])*self->matrix ); } else return ( EXPP_ReturnPyObjError( PyExc_TypeError, "unable to transpose matrix\n" ) ); @@ -492,9 +492,9 @@ PyObject *Matrix_Identity( MatrixObject * self ) self->matrix[1][0] = 0.0f; self->matrix[1][1] = 1.0f; } else if( self->rowSize == 3 ) { - Mat3One( *self->matrix ); + Mat3One( ( float ( * )[3] ) *self->matrix ); } else if( self->rowSize == 4 ) { - Mat4One( *self->matrix ); + Mat4One( ( float ( * )[4] ) *self->matrix ); } else return ( EXPP_ReturnPyObjError( PyExc_TypeError, "unable to create identity matrix\n" ) ); @@ -668,7 +668,7 @@ static int Matrix_len( MatrixObject * self ) return ( self->colSize * self->rowSize ); } -PyObject *Matrix_add( PyObject * m1, PyObject * m2 ) +static PyObject *Matrix_add( PyObject * m1, PyObject * m2 ) { float *mat; int matSize, rowSize, colSize, x, y; @@ -710,7 +710,7 @@ PyObject *Matrix_add( PyObject * m1, PyObject * m2 ) return newMatrixObject( mat, rowSize, colSize ); } -PyObject *Matrix_sub( PyObject * m1, PyObject * m2 ) +static PyObject *Matrix_sub( PyObject * m1, PyObject * m2 ) { float *mat; int matSize, rowSize, colSize, x, y; @@ -752,7 +752,7 @@ PyObject *Matrix_sub( PyObject * m1, PyObject * m2 ) return newMatrixObject( mat, rowSize, colSize ); } -PyObject *Matrix_mul( PyObject * m1, PyObject * m2 ) +static PyObject *Matrix_mul( PyObject * m1, PyObject * m2 ) { PyObject *retval; int matSizeV, rowSizeV, colSizeV, rowSizeW, colSizeW, matSizeW, x, y,z; @@ -830,7 +830,7 @@ PyObject *Matrix_mul( PyObject * m1, PyObject * m2 ) } //coercion of unknown types to type MatrixObject for numeric protocols -int Matrix_coerce( PyObject ** m1, PyObject ** m2 ) +static int Matrix_coerce( PyObject ** m1, PyObject ** m2 ) { long *tempI; double *tempF; |