Commit ff92fe95 authored by Alexander Larsson's avatar Alexander Larsson

Support initial underscores in dbus codegen namespace

Before these were considered lowercase and thus got duplicated.
parent 415a8d81
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment