Erik Bray <erik.m.b...@gmail.com> added the comment:

> For those who are not very aware of Cygwin issues: what is wrong with
>
> PyVarObject_HEAD_INIT(&PyType_Type, 0);

I'm glad you asked, because it actually got me thinking, and since I added a 
fix (albeit an unsatisfying one) for issue34212, this fix is no longer strictly 
necessary *so long as* the _abc module is always built as a core built-in (that 
is, linked into libpython).

IIUC that is the case since _abc is required for the core, but I'm not sure.

The problem is explained somewhat in issue21124, but what it comes down to is 
that if the linker can't resolve PyType_Type at link time it will make a 
complaint like "can't initialize global with a non-constant".

Because of issue34212, when compiling _abc.c it was using the wrong external 
linkage for PyType_Type (treating it as some data that needs to be imported 
from an other DLL, rather than data in the same DLL).  But with a fix for 
issue34212 this is not a problem (again, so long as the _abc module is included 
in libpython).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34211>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to