mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-14 06:20:56 +02:00
Support initial underscores in dbus codegen namespace
Before these were considered lowercase and thus got duplicated.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user