GNOME Bugzilla – Bug 700896
Rename gtk_widget_class_declare_callback()
Last modified: 2013-07-30 04:13:39 UTC
the naming of the macro and the function it's hiding should at least be related. I do have my doubts as to why the macro exists in the first place — it's not like a function that takes a string and a function pointer requires much more syntactic sugar — but the two should at least hint at each other. there's is a certain distance between "binding" a callback and "declaring" a callback. the function should be called gtk_widget_class_bind_callback_full(), and the macro can continue being gtk_widget_class_bind_callback().
(In reply to comment #0) > the naming of the macro and the function it's hiding should at least be > related. > > I do have my doubts as to why the macro exists in the first place — it's not > like a function that takes a string and a function pointer requires much more > syntactic sugar — but the two should at least hint at each other. there's is a > certain distance between "binding" a callback and "declaring" a callback. As I mentioned in bug 700898, originally I had no convenience macro the C code looked very redundant, I ended up appreciating the macro in the end. Actually in this case I had a vararg function originally which took string / function pointer pairs... but it still looked quite redundant :-/ > the function should be called gtk_widget_class_bind_callback_full(), and the > macro can continue being gtk_widget_class_bind_callback(). Definitely agree, I'll leave some time and space for others to comment, and I'll make the change, say this weekend... if nobody comments. C code will only need to recompile, and I suspect the Vala compiler will need to change a couple lines of code, shouldn't cause too much churn.
patch attached to bug 700898
This was fixed