aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/qmi-codegen/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/build-aux/qmi-codegen/utils.py b/build-aux/qmi-codegen/utils.py
index b490c6f..a4044dd 100644
--- a/build-aux/qmi-codegen/utils.py
+++ b/build-aux/qmi-codegen/utils.py
@@ -163,7 +163,8 @@ e.g.: "ThisIsAMessage" --> "this_is_a_message"
"""
def build_underscore_name_from_camelcase(camelcase):
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', camelcase)
- return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
+ s2 = re.sub('(.)([0-9][a-z]+)', r'\1_\2', s1)
+ return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s2).lower()
"""