diff options
-rw-r--r-- | src/vulkan/util/gen_enum_to_str.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vulkan/util/gen_enum_to_str.py b/src/vulkan/util/gen_enum_to_str.py index fb9ecd65c6d..06f74eb487c 100644 --- a/src/vulkan/util/gen_enum_to_str.py +++ b/src/vulkan/util/gen_enum_to_str.py @@ -101,6 +101,10 @@ H_TEMPLATE = Template(textwrap.dedent(u"""\ #include <vulkan/vulkan.h> #include <vulkan/vk_android_native_buffer.h> + #ifdef __cplusplus + extern "C" { + #endif + % for ext in extensions: #define _${ext.name}_number (${ext.number}) % endfor @@ -109,6 +113,10 @@ H_TEMPLATE = Template(textwrap.dedent(u"""\ const char * vk_${enum.name[2:]}_to_str(${enum.name} input); % endfor + #ifdef __cplusplus + } /* extern "C" */ + #endif + #endif"""), output_encoding='utf-8') |