mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-18 22:50:40 +00:00
Merge branch 'pybind:master' into master
This commit is contained in:
commit
8fd14ab4f7
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@ -737,6 +737,9 @@ jobs:
|
|||||||
args: -DCMAKE_CXX_STANDARD=20
|
args: -DCMAKE_CXX_STANDARD=20
|
||||||
- python: 3.8
|
- python: 3.8
|
||||||
args: -DCMAKE_CXX_STANDARD=17
|
args: -DCMAKE_CXX_STANDARD=17
|
||||||
|
- python: 3.7
|
||||||
|
args: -DCMAKE_CXX_STANDARD=14
|
||||||
|
|
||||||
|
|
||||||
name: "🐍 ${{ matrix.python }} • MSVC 2019 • x86 ${{ matrix.args }}"
|
name: "🐍 ${{ matrix.python }} • MSVC 2019 • x86 ${{ matrix.args }}"
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
|
@ -514,8 +514,13 @@ struct local_internals {
|
|||||||
|
|
||||||
/// Works like `get_internals`, but for things which are locally registered.
|
/// Works like `get_internals`, but for things which are locally registered.
|
||||||
inline local_internals &get_local_internals() {
|
inline local_internals &get_local_internals() {
|
||||||
static local_internals locals;
|
// Current static can be created in the interpreter finalization routine. If the later will be
|
||||||
return locals;
|
// destroyed in another static variable destructor, creation of this static there will cause
|
||||||
|
// static deinitialization fiasco. In order to avoid it we avoid destruction of the
|
||||||
|
// local_internals static. One can read more about the problem and current solution here:
|
||||||
|
// https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables
|
||||||
|
static auto *locals = new local_internals();
|
||||||
|
return *locals;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Constructs a std::string with the given arguments, stores it in `internals`, and returns its
|
/// Constructs a std::string with the given arguments, stores it in `internals`, and returns its
|
||||||
|
Loading…
Reference in New Issue
Block a user