Compilation errors: void functions should not return values
moble opened this issue · 3 comments
On compilation, I get various errors of the following type:
npytypes/rational/rational.c:1068:9: error: void function 'initrational' should not return a value [-Wreturn-type]
return NULL;
^ ~~~~
and
npytypes/quaternion/numpy_quaternion.c:529:9: error: void function 'initnumpy_quaternion' should not return a value [-Wreturn-type]
return NULL;
^ ~~~~
If I simply change each of those lines to return;, compilation succeeds, and the modules seem to (mostly) work.
python --version = Python 2.7.7
numpy.__version__ = 1.8.1
gcc --version = Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
have you fixed it ?
It looks like this repo is dead (and was even when I opened this issue). But I have created a more complete quaternion package that gets tested routinely against python 2.7 and more recent 3.x versions. The solution I use there is to detect the python version, and change the return statement as needed. This can be seen starting at this line.
If you want quaternions, you'd be better off just using my package. If you want rationals, you might want to use my code as a starting point for a more up-to-date template.
Yeah, I think it is dead right now, but especially if you like to host your fixes here, we should maybe talk about that. Or, as long as yours is the "go-to" version, maybe just update the documentation to point to it?