GNOME Bugzilla – Bug 765210
Simplify / modernize GObject boilerplate
Last modified: 2016-04-18 18:00:35 UTC
VtePty is a final class, and it was like that even before the most recent ABI bump. Since the definitions of the instance and class structs are not exported, there is no reason to use a separate private structure. In case it was a deliberate decision to use a private struct, we should at least use the modern G_ADD_PRIVATE / my_object_get_instance_private combination instead of g_type_class_add_private / G_TYPE_INSTANCE_GET_PRIVATE.
Created attachment 326251 [details] [review] pty: Use G_ADD_PRIVATE instead of g_type_class_add_private
Created attachment 326252 [details] [review] pty: Simplify the code by removing the separate private struct
Created attachment 326260 [details] [review] Use my_object_get_instance_private, not G_TYPE_INSTANCE_GET_PRIVATE
Comment on attachment 326251 [details] [review] pty: Use G_ADD_PRIVATE instead of g_type_class_add_private Ok (master only)
Comment on attachment 326252 [details] [review] pty: Simplify the code by removing the separate private struct No, this isn't where I want to go. These structs need to remain reparate (in fact the goal is to make all the public vte API just call functions on private C++ classes, like VteTerminalPrivate already does. Just haven't got to VtePty yet.)
Comment on attachment 326260 [details] [review] Use my_object_get_instance_private, not G_TYPE_INSTANCE_GET_PRIVATE Ok to change this to the faster accessor, but this is the one place where I don't want to use IMPL; just spell it out.
Comment on attachment 326251 [details] [review] pty: Use G_ADD_PRIVATE instead of g_type_class_add_private Pushed to master.
Created attachment 326277 [details] [review] Use my_object_get_instance_private, not G_TYPE_INSTANCE_GET_PRIVATE
Comment on attachment 326277 [details] [review] Use my_object_get_instance_private, not G_TYPE_INSTANCE_GET_PRIVATE Thanks for the review, Christian.