some uglyness in Python imho

effbot at pythonware.com effbot at pythonware.com
Sat Sep 9 15:08:44 CEST 2000


Jay wrote:
> *DL_IMPORT __declspec(dllexport,import,etc)
>
> Is this strictly for Windows, or do Unix, Mac, etc. need them?
> (I'm pretty sure Unix does not and Mac makes do at least with
> #pragmas at the top and bottom of the header).
>
> If they are only for Windows, you shouldn't use them.
> You can just use a .def file without spoiling your source
> code.

And who's gonna make sure the DEF file is always kept
100% up to date?

Earlier versions of Python tried this approach.  Didn't
work.  Since most development is done on Unix, important
functions were always missing from the Windows DLL's.

A macro makes it *much* easier for non-Windows programmers
to get things right from the start, without having to test
the code on a platform they don't use...

...besides, if Microsoft didn't want us to use this, they
shouldn't have added the declspec directive to the compiler
in the first place ;-)

</F>


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list