| 1034 | /// suitable for c-style strings needed by Python internals (such as PyTypeObject's tp_name). |
| 1035 | template <typename... Args> |
| 1036 | const char *c_str(Args &&...args) { |
| 1037 | // GCC 4.8 doesn't like parameter unpack within lambda capture, so use |
| 1038 | // PYBIND11_LOCK_INTERNALS. |
| 1039 | auto &internals = get_internals(); |
| 1040 | PYBIND11_LOCK_INTERNALS(internals); |
| 1041 | auto &strings = internals.static_strings; |
| 1042 | strings.emplace_front(std::forward<Args>(args)...); |
| 1043 | return strings.front().c_str(); |
| 1044 | } |
| 1045 | |
| 1046 | PYBIND11_NAMESPACE_END(detail) |
| 1047 |
no outgoing calls
no test coverage detected