GNOME Bugzilla – Bug 643744
GDbus: C compile errors when using reserved names as method/signal parameters
Last modified: 2011-04-03 15:08:57 UTC
Created attachment 182322 [details] [review] GDbus: avoid C compile errors when using reserved names as parameters When using a reserved parameter in a DBus method/signal (like "self") there are compilation issues. Example: [DBus (name = "org.example.Demo")] public class DemoServer : Object { public int ping (string self) { print(self+"\n"); } } The same would happen using an interface (DBus client); the attached patch fixes it using the get_variable_cname function to get the valid variable name.
Agreed, that should go in.
commit 5c1be07f25c27d8ad9e9451826ece43460fa3aee Author: Marco Trevisan (Treviño) <mail@3v1n0.net> Date: Thu Mar 3 03:39:55 2011 +0100 D-Bus: Avoid invalid C code when using reserved names as parameters Fixes bug 643744.