Re: What is "None" in C module

James C. Ahlstrom (jim@interet.com)
11 Apr 1995 08:14:42 -0400

In article <3m4np2$i7g@intrt7.interet.com>,
James C. Ahlstrom <jim@interet.com> wrote:
>
>if (obj2 == Py_None) // Doesn't work

Following a suggestion from Mark Hammond I figured it out. The
linkage to dll's was changed in VC++2.0 and now requires a special
__declspec(dllexport) keyword. It no longer requires a ".def" file.
So with broken dll linkage, the Py_None was equal to the address of
the real Py_None plus one (don't ask me why plus one). This problem
seems to exist only for exported data items, not functions. So as
a quick fix, I am linking static. Beware of exported data objects
if you switch Microsoft VC++ versions.

Thanks Mark!

Jim Ahlstrom