[Python-Dev] PyObject_GenericGetAttr vs cygwin
Michael Hudson
mwh@python.net
08 Nov 2001 11:00:58 -0500
CVS doesn't build cleanly on cygwin at the moment.
The problem is that the address of a DL_IMPORT()ed function is not a
compile time constant when building shared libraries, so when a type
wants to use PyObject_GenericGetAttr as it's tp_getattro it shouldn't
include it in the PyTypeObject definition (similar to why we now
always write
PyObject_HEAD_INIT(NULL)
).
This means that (currently) cPickle and socket don't build as shared
libraries.
Two solutions:
(1) build them statically. This works, but is hardly a long term
solution.
(2) change them to poke the relavent things into the type object at
module load time.
Shall I just do (2)?
Anyways, I thought I should mention this as an issue.
Cheers,
M.
--
C is not clean -- the language has _many_ gotchas and traps, and
although its semantics are _simple_ in some sense, it is not any
cleaner than the assembly-language design it is based on.
-- Erik Naggum, comp.lang.lisp