The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

a/bindings: Add C++ guards in header

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2491>

authored by

Jakob Bornecrantz and committed by
Marge Bot
3994a3c8 7e8ded86

+12
+12
src/xrt/auxiliary/bindings/bindings.py
··· 1 1 #!/usr/bin/env python3 2 2 # Copyright 2020-2023, Collabora, Ltd. 3 + # Copyright 2024-2025, NVIDIA CORPORATION. 3 4 # SPDX-License-Identifier: BSL-1.0 4 5 """Generate code from a JSON file describing interaction profiles and 5 6 bindings.""" ··· 901 902 902 903 #include "xrt/xrt_defines.h" 903 904 905 + 906 + #ifdef __cplusplus 907 + extern "C" {{ 908 + #endif 909 + 904 910 typedef uint64_t XrPath; // OpenXR typedef 905 911 typedef uint64_t XrVersion; // OpenXR typedef 906 912 ··· 1010 1016 f.write('xrt_output_name_enum(const char *output);\n\n') 1011 1017 1012 1018 f.write("\n// clang-format on\n") 1019 + f.write(f''' 1020 + #ifdef __cplusplus 1021 + }} 1022 + #endif 1023 + ''') 1024 + 1013 1025 f.close() 1014 1026 1015 1027