Skip to content

Remove deprecated method of doing private structs on gobjects

Shaun McCance requested to merge shaunm/yelp:update-deprecated-priv into master

This updates the code to use the new method of instance private data:

  • I removed calls to g_type_class_add_private.
  • I renamed Priv structs and typedefs to Private where necessary.
  • I used G_DEFINE_TYPE_WITH_PRIVATE where possible, or G_ADD_PRIVATE in cases where G_DEFINE_TYPE_WITH_CODE is used.
  • I replaced GET_PRIV calls with _get_instance_private calls.
  • I decided to leave in the few places where the private struct was part of the public struct. Those cases do use the new private instance method. They just also have a direct pointer access.

It compiled. It ran. It was pretty straightforward and I think I got everything right. But I'd still appreciate a review. @davidk can you look it over? Or at somebody else you'd like to look it over.

Merge request reports