From 8cb979ec4c4cc52c3de34a9fff22a0f53a796074 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 1 Mar 2017 00:21:54 +0100 Subject: libqmi-glib: fix enum nicknames with '3gpp' on it --- build-aux/qmi-codegen/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'build-aux') 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() """ -- cgit v1.1