Lisandro Dalcin, 17.02.2010 23:38:
> What is not clear to me is the following: Should "public", "api", or
> "public api" have any semantic diference?
> [...]
> Greg said that he never intended to provide DLL export
> mechanisms, and in fact he just wanted to make stuff available across
> compilation units (i.e, make stuff available to other C source files
> being compiled ALONGSIDE the generated C sources to build the final
> ext module). If we enforce this, I mean we are not going to support
> ext module interlinking, then almost the usages of DL_IMPORT/DL_EXPORT
> macros are a nonsense and should be removed, alongside almost all
> these dll_linkage arguments in many methods.
> [...]
> So... What do you think?

My take is that public symbols are only portably usable at static link
time, so supporting more is simply not worth it. Even static linking
against symbols exported by a Cython module should be a very rare use case.
It's not used when calling external C code nor is it worth anything when
providing callbacks into the Cython code. Most of the time, the external
code will be there first and will be used by the Cython code, not the other
way round. This mechanism shouldn't be seen as something that's usable at
dynamic linking time. There's public C-API support for that. I second your
intuition that the DL_EXPORT stuff can be dropped completely.

There's also the use case of statically linking multiple Cython modules
into one extension module. This isn't currently supported (really), and
there's more to do to make it run smooth. But I don't think it would
interfere with the above in any way.

Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to