durusmail: quixote-users: Fix to build _c_htmltext.c on Windows
Fix to build _c_htmltext.c on Windows
2003-01-17
2003-01-17
Fix to build _c_htmltext.c on Windows
Graham Fawcett
2003-01-17
Hi folks,

I've tried building _c_htmlext on Windows using both MSVC and MinGW,
neither time with success. The problem stems from the PyTypeObjects
being initialized with PyObject_HEAD_INIT(&PyType_Type), resulting in a
"initializer is not a constant" compiler error.

It looks like the code was written to accommodate this: lines 918-922
initialize the object types (redundantly, in this case, it seems).

I was able to compile by changing the "PyObject_HEAD_INIT(&PyType_Type)"
references in the TypeObject definitions to "PyObject_HEAD_INIT(NULL)".
The init() code then gets to do its part.

Would patching the code thusly break support on other platforms?

Best wishes,

-- Graham Fawcett



reply