[Zope3-dev] Zope3 vs CVS Python
Shane Hathaway
shane@zope.com
Tue, 06 Aug 2002 10:43:55 -0400
Guido van Rossum wrote:
>>That brings me to a slightly different topic that still fits the subject
>>line. If anyone can help, I'd like to understand why gcc 2.95.3 under
>>Wine doesn't think PyType_GenericNew, PyType_GenericAlloc,
>>_PyObject_GC_Del are constants. Compiling the Zope3 modules that use
>>these constants in the PyTypeObject struct results in errors like this:
>>
>>wrapper.c:228: initializer element is not constant
>>wrapper.c:228: (near initialization for `WrapperType.tp_alloc')
>>wrapper.c:230: initializer element is not constant
>>wrapper.c:230: (near initialization for `WrapperType.tp_free')
>>error: command 'gcc' failed with exit status 1
>
>
> Hm. This works with GCC on Unix, and also works with MSVC on Windows.
> But if you feel that GCC on Windows is an important target, can you
> please check in a fix?
Ok, I'll check it in soon. GCC on Windows lets us give an answer to all
the folks on the mailing lists who want to use Zope source releases and
Zope CVS without buying and learning MSVC.
> It's a fine line, initializing structures with
> addresses defined in different files often doesn't seem to work on
> Windows. MSVC has this problem only for the address of external
> data, I believe -- over the years we've grown a whole set of ways to
> deal with the fact that you can't initialize the ob_type field of a
> type struct with &PyType_Type on Windows...
Ok. I didn't want to slightly muck up the code unless there's no better
way.
Shane