Re: [Numpy-discussion] typo in arrayobject.h?
![](https://secure.gravatar.com/avatar/8b69f4e97ce35b8ef791c861d75328eb.jpg?s=120&d=mm&r=g)
Dear Konrad,
There should be a semicolon there according to my understanding of C syntax!
Konrad.
According to my understanding of C there should indeed be a semicolon as well, but the C compiler gives a syntax errro warning. The first lines of my C code (which runs perfectly under Linux with gcc BTW) are as follows: #include "c:\python22\include\Python.h" #include "c:\python22\include\numeric\arrayobject.h" #define PY_ARRAY_UNIQUE_SYMBOL #include "libnumpy-access.h" static PyObject* find_minimum(PyObject *self, PyObject *args){ ........ Ok, I found the problem. Within libnumpy-access.h yet again arrayobject.h is called which causes the problem. So changing this to #include "c:\python22\include\Python.h" #include "c:\python22\include\numeric\arrayobject.h" #include "libnumpy-access.h" #define PY_ARRAY_UNIQUE_SYMBOL static PyObject* find_minimum(PyObject *self, PyObject *args){ ........ Now it works perfectly. Probably my code runs under linux anyway due to silly CR LF things which always bug multiplatform development. Kudos to Fernando Perez because his libnumpy-access files make my code a lot more readable. with best regards, Christiaan Kok
![](https://secure.gravatar.com/avatar/a53ea657e812241a1162060860f698c4.jpg?s=120&d=mm&r=g)
On Tuesday 18 March 2003 09:29, christiaan.kok@philips.com wrote:
In that case, you can as well remove the #define line, because it has no effect when used after including arrayobject.h. Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais -------------------------------------------------------------------------------
![](https://secure.gravatar.com/avatar/a53ea657e812241a1162060860f698c4.jpg?s=120&d=mm&r=g)
On Tuesday 18 March 2003 09:29, christiaan.kok@philips.com wrote:
In that case, you can as well remove the #define line, because it has no effect when used after including arrayobject.h. Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais -------------------------------------------------------------------------------
participants (2)
-
christiaan.kok@philips.com
-
Konrad Hinsen