MCPcopy Create free account
hub / github.com/pybind/pybind11 / TEST_SUBMODULE

Function TEST_SUBMODULE

tests/test_unnamed_namespace_a.cpp:7–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5} // namespace
6
7TEST_SUBMODULE(unnamed_namespace_a, m) {
8 if (py::detail::get_type_info(typeid(any_struct)) == nullptr) {
9 py::class_<any_struct>(m, "unnamed_namespace_a_any_struct");
10 } else {
11 m.attr("unnamed_namespace_a_any_struct") = py::none();
12 }
13 m.attr("defined_WIN32_or__WIN32") =
14#if defined(WIN32) || defined(_WIN32)
15 true;
16#else
17 false;
18#endif
19 m.attr("defined___clang__") =
20#if defined(__clang__)
21 true;
22#else
23 false;
24#endif
25 m.attr("defined__LIBCPP_VERSION") =
26#if defined(_LIBCPP_VERSION)
27 true;
28#else
29 false;
30#endif
31 m.attr("defined___GLIBCXX__") =
32#if defined(__GLIBCXX__)
33 true;
34#else
35 false;
36#endif
37}

Callers

nothing calls this directly

Calls 2

noneClass · 0.85
attrMethod · 0.80

Tested by

no test coverage detected