aboutsummaryrefslogtreecommitdiff
path: root/scripts/style_api_gen.py
diff options
context:
space:
mode:
authorKevin Schlosser <kdschlosser@users.noreply.github.com>2024-03-13 20:38:25 -0600
committerGitHub <noreply@github.com>2024-03-14 10:38:25 +0800
commit1f76eabadd10a4ab3870a01e4a95ccbeb07fda0b (patch)
tree60e8f3fb8bad9c811e493cd7b97786c6bf967c78 /scripts/style_api_gen.py
parent442efeef211527bf8b90bbebdb09a7270fab1040 (diff)
downloadlvgl-1f76eabadd10a4ab3870a01e4a95ccbeb07fda0b.tar.gz
lvgl-1f76eabadd10a4ab3870a01e4a95ccbeb07fda0b.zip
adds `extern "C"` to the header files that were missing it. (#5857)
Diffstat (limited to 'scripts/style_api_gen.py')
-rwxr-xr-xscripts/style_api_gen.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/style_api_gen.py b/scripts/style_api_gen.py
index f1a3231ff..f08d550af 100755
--- a/scripts/style_api_gen.py
+++ b/scripts/style_api_gen.py
@@ -631,6 +631,11 @@ print(HEADING)
print('#ifndef LV_OBJ_STYLE_GEN_H')
print('#define LV_OBJ_STYLE_GEN_H')
print()
+print('''\
+#ifdef __cplusplus
+extern "C" {
+#endif
+''')
print("#include \"../misc/lv_area.h\"")
print("#include \"../misc/lv_style.h\"")
print("#include \"../core/lv_obj_style.h\"")
@@ -648,6 +653,12 @@ for p in props:
guard_close()
print()
+print('''\
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+''')
+
print('#endif /* LV_OBJ_STYLE_GEN_H */')
sys.stdout = open(base_dir + '/../src/core/lv_obj_style_gen.c', 'w')
@@ -678,6 +689,11 @@ print(HEADING)
print('#ifndef LV_STYLE_GEN_H')
print('#define LV_STYLE_GEN_H')
print()
+print('''\
+#ifdef __cplusplus
+extern "C" {
+#endif
+''')
for p in props:
guard_proc(p)
@@ -690,6 +706,11 @@ for p in props:
guard_close()
print()
+print('''\
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+''')
print('#endif /* LV_STYLE_GEN_H */')
sys.stdout = open(base_dir + '/../docs/overview/style-props.rst', 'w')