• Tim Peters's avatar
    David Abrahams tried to compile this as a separate DLL under MSVC, and · 3e197aab
    Tim Peters authored
    got a barrage of compile errors that didn't make sense to the C++ brain:
    MSVC does not allow C (but does allow C++) initializers to contain
    data addresses supplied by other DLLs.  So changed the initializers here
    to use dummy nulls, and changed module init to plug in the foreign
    addresses at runtime (manually simulating what C++ does by magic).  Tested
    on Windows, and Guido tested on Linux (thanks!).  BTW, the *point* is that
    people are going to use this module as a template for writing their own
    subtypes, and it's unusual for extension authors to build their extensions
    into Python directly (separate DLLs are the norm on Windows); so it's
    better if we give them a template that works <wink>.
    3e197aab
xxsubtype.c 6.55 KB