Commit 54d73b7c authored by Olivier Aubert's avatar Olivier Aubert

python-ctypes: fix enum names conversion

parent 4e6b43f9
......@@ -234,7 +234,7 @@ def generate_enums(enums):
n=k.split('_')[-1]
if len(n) == 1:
# Single character. Some symbols use 1_1, 5_1, etc.
n="_".join( k.split('_')[:-2] )
n="_".join( k.split('_')[-2:] )
if re.match('^[0-9]', n):
# Cannot start an identifier with a number
n='_'+n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment