mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 14:36:16 +01:00
Support initial underscores in dbus codegen namespace
Before these were considered lowercase and thus got duplicated.
This commit is contained in:
parent
415a8d81f6
commit
ff92fe9593
@ -44,7 +44,14 @@ def camel_case_to_uscore(s):
|
||||
ret = ''
|
||||
insert_uscore = False
|
||||
prev_was_lower = False
|
||||
initial = True;
|
||||
for c in s:
|
||||
# Keep initial underscores in camel case
|
||||
if initial and c == '_':
|
||||
ret += '_'
|
||||
continue;
|
||||
initial = False
|
||||
|
||||
if c.isupper():
|
||||
if prev_was_lower:
|
||||
insert_uscore = True
|
||||
|
Loading…
Reference in New Issue
Block a user