[Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 Python
Mon, 10 Jul 2000 02:20:48 -0700
On Sun, Jul 09, 2000 at 08:49:26PM -0500, Guido van Rossum wrote:
> > Guido van Rossum wrote:
> > >
> > > ...
> > > Nice idea... Unfortunately it means that every module must be
> > > changed. If we want to do this, we'd best introduce a macro!
> > > E.g. (untested):
> > >
> > > #define Py_INIT(modname) DL_EXPORT(void) init20##modname()
> Paul Prescod replies:
> > Why is it that the init function names has to change for each module?
> > Why not PyModuleMain or something?
> Because Python supports a configuration time option to link modules
Not to mention that the .so is loaded into the process' address space. I
don't think that you can have two symbols in the space with the same name.
But hey... even if you can: the static link option Guido mentions is
definitely the kicker.
Greg Stein, http://www.lyra.org/