[SciPy-Dev] Bundling Boost?

Nathaniel Smith njs@pobox....
Mon Oct 8 06:09:04 CDT 2012


On Mon, Oct 8, 2012 at 11:41 AM, David Cournapeau <cournape@gmail.com> wrote:
> In this case, I don't mind so much, because:
>   - the templates for each special function are used in only one
> compilation unit, so they will be compiled only once
>   - there is a mode when you can force the exceptions do be disabled
> and use ERRNO instead, so not too many issues there either.

Wait, literally 'errno'? That seems like a terrible idea, given how
tightly wound that API is with low-level system interfaces and
compatibility hacks. C wrappers that looked like

extern "C" double my_c_j0_wrapper(double x, int * errflags) {
    try {
        return boost_j0(x);
    } except (boost::exception e) {
        *errflags |= exc_to_flags(e);
    }
}

would be just as easy to auto-generate as anything else, and we'd
never have to fight with thread-local storage platform compatibility
issues or anything...

-n


More information about the SciPy-Dev mailing list