pyrex error

Bryan belred1 at yahoo.com
Mon Aug 4 10:08:03 EDT 2003


"Gerhard Häring" <gh at ghaering.de> wrote in message news:mailman.1059853685.20382.python-list at python.org...
> Bryan wrote:
> > [PyRex produces code using staticforward that won't work in the combination Python 2.3/MSVC]
>
> 1) Please don't top-post.
>
> 2) The other way to temporarily solve this problem is to use MINGW
> instead of MSVC.
>
> In the PySQLite sources, I added this snippet on top:
>
> #ifdef _MSC_VER
> #define staticforward extern
> #endif
>
> to make it compilable under MSVC/Python 2.3. *After* #include-ing
> "Pyhton.h" of course.
>
> -- Gerhard
>

i've decided to go with gerhard's approach with one minor modification:

#ifdef _MSC_VER
#undef staticforward
#define staticforward extern
#endif

this solution is best for me because i want to take the resulting c file and give it to others so they can compile it on other OS's
and compilers.

why can't this code be placed in the pyrex header?  seems like a simple fix.

bryan






More information about the Python-list mailing list