From 1f76eabadd10a4ab3870a01e4a95ccbeb07fda0b Mon Sep 17 00:00:00 2001 From: Kevin Schlosser Date: Wed, 13 Mar 2024 20:38:25 -0600 Subject: adds `extern "C"` to the header files that were missing it. (#5857) --- scripts/style_api_gen.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'scripts/style_api_gen.py') 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') -- cgit v1.2.3