| 1442 | }; |
| 1443 | |
| 1444 | class multiple_interpreters { |
| 1445 | public: |
| 1446 | enum class level { |
| 1447 | not_supported, /// Use to activate Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED |
| 1448 | shared_gil, /// Use to activate Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED |
| 1449 | per_interpreter_gil /// Use to activate Py_MOD_PER_INTERPRETER_GIL_SUPPORTED |
| 1450 | }; |
| 1451 | |
| 1452 | static multiple_interpreters not_supported() { |
| 1453 | return multiple_interpreters(level::not_supported); |
| 1454 | } |
| 1455 | static multiple_interpreters shared_gil() { return multiple_interpreters(level::shared_gil); } |
| 1456 | static multiple_interpreters per_interpreter_gil() { |
| 1457 | return multiple_interpreters(level::per_interpreter_gil); |
| 1458 | } |
| 1459 | |
| 1460 | explicit constexpr multiple_interpreters(level l) : level_(l) {} |
| 1461 | level value() const { return level_; } |
| 1462 | |
| 1463 | private: |
| 1464 | level level_; |
| 1465 | }; |
| 1466 | |
| 1467 | PYBIND11_NAMESPACE_BEGIN(detail) |
| 1468 |
no outgoing calls
no test coverage detected