projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
415a8d8
)
Support initial underscores in dbus codegen namespace
author
Alexander Larsson
<alexl@redhat.com>
Mon, 16 Apr 2012 07:55:29 +0000
(09:55 +0200)
committer
Alexander Larsson
<alexl@redhat.com>
Thu, 19 Apr 2012 08:24:08 +0000
(10:24 +0200)
Before these were considered lowercase and thus got duplicated.
gio/gdbus-2.0/codegen/utils.py
patch
|
blob
|
history
diff --git
a/gio/gdbus-2.0/codegen/utils.py
b/gio/gdbus-2.0/codegen/utils.py
index
687b979
..
94bd05c
100644
(file)
--- a/
gio/gdbus-2.0/codegen/utils.py
+++ b/
gio/gdbus-2.0/codegen/utils.py
@@
-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