Mailing List Archive

Re: [PSA MEMBERS] Please test new dynamic load behavior
Greg Stein wrote:
>
> Hi all,
>
> I reorganized Python's dynamic load/import code over the past few days.
> Gudio provided some feedback, I did some more mods, and now it is checked
> into CVS. The new loading behavior has been tested on Linux, IRIX, and
> Solaris (and probably Windows by now).
>

...


What was the motivation behind this modification?

Just curious,

-Harri
Re: Please test new dynamic load behavior [ In reply to ]
On Thu, 23 Dec 1999, Harri Pasanen wrote:
> Greg Stein wrote:
> > Hi all,
> >
> > I reorganized Python's dynamic load/import code over the past few days.
> > Gudio provided some feedback, I did some more mods, and now it is checked
> > into CVS. The new loading behavior has been tested on Linux, IRIX, and
> > Solaris (and probably Windows by now).
>
> ...
>
> What was the motivation behind this modification?

Harri -

With the new code structure, it is much easier to maintain Python's
loading code.

Each platform has its own file (e.g. dynload_aix.c) rather than being all
jammed together into importdl.c. This isn't a huge win by itself, but does
increase readability/maintainability. The big improvement, however, is
when you are adding support for new platforms or loading mechanisms. A new
dynload_*.c can be written and one line added to configure.in, and you're
done. No need to make importdl.c even uglier. (actually, importdl.c no
longer contains *any* platform specific code; it has all been moved to the
dynload_*.c files)

Cheers,
-g

--
Greg Stein, http://www.lyra.org/