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
diff --git a/gobject/gtype.c b/gobject/gtype.c
index 23f503d..99d7426 100644
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -4473,6 +4473,10 @@
  * ]|
  *
  * 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,
diff --git a/gobject/gtype.h b/gobject/gtype.h
index c21936d..32221e2 100644
--- a/gobject/gtype.h
+++ b/gobject/gtype.h
@@ -1281,7 +1281,7 @@
 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
diff --git a/gobject/tests/private.c b/gobject/tests/private.c
index 9a10262..6b99c4c 100644
--- a/gobject/tests/private.c
+++ b/gobject/tests/private.c
@@ -123,11 +123,13 @@
 
 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)