mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-23 00:49:36 +00:00
* Start pybind11v3 * Remove all code for PYBIND11_INTERNALS_VERSION 4 and 5 * Fix oversight: pybind11/_version.py needs to be updated as well. * Add @pytest.mark.skipif("env.GRAALPY", reason="TODO debug segfault")
38 lines
774 B
C++
38 lines
774 B
C++
#include "pybind11_tests.h"
|
|
|
|
namespace {
|
|
struct any_struct {};
|
|
} // namespace
|
|
|
|
TEST_SUBMODULE(unnamed_namespace_a, m) {
|
|
if (py::detail::get_type_info(typeid(any_struct)) == nullptr) {
|
|
py::class_<any_struct>(m, "unnamed_namespace_a_any_struct");
|
|
} else {
|
|
m.attr("unnamed_namespace_a_any_struct") = py::none();
|
|
}
|
|
m.attr("defined_WIN32_or__WIN32") =
|
|
#if defined(WIN32) || defined(_WIN32)
|
|
true;
|
|
#else
|
|
false;
|
|
#endif
|
|
m.attr("defined___clang__") =
|
|
#if defined(__clang__)
|
|
true;
|
|
#else
|
|
false;
|
|
#endif
|
|
m.attr("defined__LIBCPP_VERSION") =
|
|
#if defined(_LIBCPP_VERSION)
|
|
true;
|
|
#else
|
|
false;
|
|
#endif
|
|
m.attr("defined___GLIBCXX__") =
|
|
#if defined(__GLIBCXX__)
|
|
true;
|
|
#else
|
|
false;
|
|
#endif
|
|
}
|