Commit e98d31d6 authored by Jason Rhinelander's avatar Jason Rhinelander
Browse files

Force hidden visibility on functions needing distinct static locals

This commit adds a PYBIND11_UNSHARED_STATIC_LOCALS macro that forces a
function to have hidden visibility under gcc and gcc-compatible
compilers.  gcc, in particular, needs this to to avoid sharing static
local variables across modules (which happens even under a RTLD_LOCAL
dlopen()!).  clang doesn't appear to have this issue, but the forced
visibility on internal pybind functions certainly won't hurt it and icc.

This updates the workaround from #862 to use this rather than the
version-specific template.
parent 373da824
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment