aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux/qmi-codegen/utils.py
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-03-01 00:21:54 +0100
committerAleksander Morgado <aleksander@aleksander.es>2017-03-01 00:51:42 +0100
commit8cb979ec4c4cc52c3de34a9fff22a0f53a796074 (patch)
tree5feb9a7e6d54f2c69de10751f9a2a70df36f3a51 /build-aux/qmi-codegen/utils.py
parent5f4d95f1aba7ff6d0c4d5cc1cb972219a3749d02 (diff)
downloadexternal_libqmi-8cb979ec4c4cc52c3de34a9fff22a0f53a796074.zip
external_libqmi-8cb979ec4c4cc52c3de34a9fff22a0f53a796074.tar.gz
external_libqmi-8cb979ec4c4cc52c3de34a9fff22a0f53a796074.tar.bz2
libqmi-glib: fix enum nicknames with '3gpp' on it
Diffstat (limited to 'build-aux/qmi-codegen/utils.py')
-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()
"""