10000 Convert spurious enums to int constants · shankezh/lv_binding_micropython@99360e4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 99360e4

Browse files
committed
Convert spurious enums to int constants
Fixes lvgl#199
1 parent 3411347 commit 99360e4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

gen/gen_mpy.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,10 @@ def register_int_ptr_type(convertor, *types):
16251625
else:
16261626
enums[enum_name] = enum
16271627

1628+
for enum in [enum for enum in enums if len(enums[enum]) == 1 and enum.startswith('ENUM')]:
1629+
int_constants.append('%s_%s' % (enum, next(iter(enums[enum]))))
1630+
del enums[enum]
1631+
16281632
# Add special string enums
16291633

16301634
print ('''

lvgl

Submodule lvgl updated 97 files

0 commit comments

Comments
 (0)
0