diff options
Diffstat (limited to 'scripts/style_api_gen.py')
-rwxr-xr-x | scripts/style_api_gen.py | 21 |
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') |