mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-16 07:03:34 +02:00
gdbus-codegen: Generate signal marshallers for each interface signal
We relied on g_cclosure_marshal_generic() to easily generate signal marshallers, but this relies on inspecting each parameter type with ffi and this implies a performance hit, other than breaking the stack-frame unwinder used by Linux perf and so by sysprof. Given that we know the types we work on, it's easy enough to generate the marshallers ourself. Helps with: https://gitlab.gnome.org/GNOME/glib/-/issues/3028
This commit is contained in:
@ -114,6 +114,10 @@ def camel_case_to_uscore(s):
|
||||
return ret
|
||||
|
||||
|
||||
def uscore_to_camel_case(s):
|
||||
return "".join([s[0].upper() + s[1:].lower() if s else "_" for s in s.split("_")])
|
||||
|
||||
|
||||
def is_ugly_case(s):
|
||||
if s and s.find("_") > 0:
|
||||
return True
|
||||
|
Reference in New Issue
Block a user