Linker issues are always tricky...
I understand that there is no problem within libpython, so the questions below refer to extension modules. I am asking them from the point of view of somebody writing Python extension modules who is clueless about Cygwin.
So you're saying that it's not allowed to refer to &PyType_Type in a static struct? But it is OK to refer to &PyType_Type in code?
I assume that there is nothing special about PyType_Type and that this apply for all variables. Are functions OK? For example, in functools.c I see
static PyGetSetDef partial_getsetlist[] = {
{"__dict__", PyObject_GenericGetDict, PyObject_GenericSetDict},
{NULL} /* Sentinel */
};
What makes functions different from variables? Aren't they essentially just pointers? |