[Python-Dev] DLL in the system directory on Windows.

Mark Hammond mhammond@skippinet.com.au
Wed, 5 Apr 2000 08:59:24 +1000


[Gordon writes]
> Things that go in the system directory should maintain
> backwards compatibility. For a DLL, that means all the old
> entry points are still there, in the same order with new ones at
> the end.

Actually, the order is not important unless people link to you by
ordinal (in which case you are likely to specify the ordinal in the
.def file anyway).  The Win32 loader is smart enough to be able to
detect that all ordinals are the same as when it was linked, and use
a fast-path.  If ordinal name-to-number mappings have changed, the
runtime loader takes a slower path that fixes up these differences.

So what you suggest is ideal, but not really necessary.

> For Python, there's no crying need to conform for
> now, but if (when?) embedding Python becomes ubiquitous,
> this (or some other scheme) may need to be considered.

I believe Python will already do this, almost by accident, due to
the conservative changes with each minor Python release.

Eg, up until Python 1.6 was branded as 1.6, I was still linking my
win32all extensions against the CVS version.  When I remembered I
would switch back to the 1.5.2 release ones, but when I forgot I
never had a problem.  People running a release version 1.5.2 could
happily use my extensions linked with the latest 1.5.2+ binaries.

We-could-even-blame-the-time-machine-at-a-strecth-ly,

Mark.