diff options
author | Lionel Landwerlin <[email protected]> | 2019-01-22 17:36:56 +0000 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-01-22 18:20:53 +0000 |
commit | a75b12ce66f0dcaa747b07410d344467e26242d8 (patch) | |
tree | 03cb0d026c14dcc965c2c9230044b80c5ac07ff0 /src | |
parent | 1cfbed758773cfc40ba4743c39517d1b63e32bb9 (diff) |
vulkan: make generated enum to strings helpers available from c++
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src')
-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') |