Deprecate g_type_class_add_private()

We have a new set of macros for adding private data structures to
instances of a new type.

https://bugzilla.gnome.org/show_bug.cgi?id=700035
This commit is contained in:
Emmanuele Bassi 2013-06-10 22:23:51 +01:00
parent abcb301c27
commit 71ccef6112
3 changed files with 7 additions and 1 deletions

View File

@ -4473,6 +4473,10 @@ gobject_init_ctor (void)
* ]|
*
* Since: 2.4
*
* Deprecated: 2.38: Use the G_ADD_PRIVATE() macro when defining the type using
* the G_DEFINE_TYPE_WITH_CODE() macro, or use G_DEFINE_TYPE_WITH_PRIVATE()
* instead.
*/
void
g_type_class_add_private (gpointer g_class,

View File

@ -1281,7 +1281,7 @@ void g_type_interface_add_prerequisite (GType interface_type,
GLIB_AVAILABLE_IN_ALL
GType*g_type_interface_prerequisites (GType interface_type,
guint *n_prerequisites);
GLIB_AVAILABLE_IN_ALL
GLIB_DEPRECATED_IN_2_38_FOR (Use the G_ADD_PRIVATE macro instead)
void g_type_class_add_private (gpointer g_class,
gsize private_size);
GLIB_AVAILABLE_IN_2_38

View File

@ -123,11 +123,13 @@ GType test_mixed_get_type (void);
G_DEFINE_TYPE (TestMixed, test_mixed, test_object_get_type ())
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static void
test_mixed_class_init (TestMixedClass *klass)
{
g_type_class_add_private (klass, sizeof (TestMixedPrivate));
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static void
test_mixed_init (TestMixed *self)