Skip to content
Snippets Groups Projects
Commit 78a810d9 authored by Stephen Swaney's avatar Stephen Swaney
Browse files

fix bad return types for errors in Matrix_coerce().

EXPP_ReturnPyObjError() should have been EXPP_ReturnIntError().
parent 7dda27fc
No related branches found
No related tags found
No related merge requests found
...@@ -850,7 +850,7 @@ int Matrix_coerce( PyObject ** m1, PyObject ** m2 ) ...@@ -850,7 +850,7 @@ int Matrix_coerce( PyObject ** m1, PyObject ** m2 )
tempI = PyMem_Malloc( 1 * tempI = PyMem_Malloc( 1 *
sizeof( long ) ); sizeof( long ) );
if( tempI == NULL ) { if( tempI == NULL ) {
return ( EXPP_ReturnPyObjError return ( EXPP_ReturnIntError
( PyExc_MemoryError, ( PyExc_MemoryError,
"problem allocating tempI\n\n" ) ); "problem allocating tempI\n\n" ) );
} }
...@@ -859,7 +859,7 @@ int Matrix_coerce( PyObject ** m1, PyObject ** m2 ) ...@@ -859,7 +859,7 @@ int Matrix_coerce( PyObject ** m1, PyObject ** m2 )
sizeof( float ) ); sizeof( float ) );
if( mat == NULL ) { if( mat == NULL ) {
PyMem_Free( tempI ); PyMem_Free( tempI );
return ( EXPP_ReturnPyObjError return ( EXPP_ReturnIntError
( PyExc_MemoryError, ( PyExc_MemoryError,
"problem allocating mat\n\n" ) ); "problem allocating mat\n\n" ) );
} }
...@@ -878,7 +878,7 @@ int Matrix_coerce( PyObject ** m1, PyObject ** m2 ) ...@@ -878,7 +878,7 @@ int Matrix_coerce( PyObject ** m1, PyObject ** m2 )
sizeof sizeof
( double ) ); ( double ) );
if( tempF == NULL ) { if( tempF == NULL ) {
return ( EXPP_ReturnPyObjError return ( EXPP_ReturnIntError
( PyExc_MemoryError, ( PyExc_MemoryError,
"problem allocating tempF\n\n" ) ); "problem allocating tempF\n\n" ) );
} }
...@@ -887,7 +887,7 @@ int Matrix_coerce( PyObject ** m1, PyObject ** m2 ) ...@@ -887,7 +887,7 @@ int Matrix_coerce( PyObject ** m1, PyObject ** m2 )
sizeof( float ) ); sizeof( float ) );
if( mat == NULL ) { if( mat == NULL ) {
PyMem_Free( tempF ); PyMem_Free( tempF );
return ( EXPP_ReturnPyObjError return ( EXPP_ReturnIntError
( PyExc_MemoryError, ( PyExc_MemoryError,
"problem allocating mat\n\n" ) ); "problem allocating mat\n\n" ) );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment