mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-04 08:23:38 +02:00
gio: Use the new private instance data declaration
Use the newly added macros, and remove the explicit calls to g_type_class_add_private(). https://bugzilla.gnome.org/show_bug.cgi?id=700035
This commit is contained in:
@@ -63,9 +63,9 @@ static void g_data_input_stream_get_property (GObject *object,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
G_DEFINE_TYPE (GDataInputStream,
|
||||
g_data_input_stream,
|
||||
G_TYPE_BUFFERED_INPUT_STREAM)
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GDataInputStream,
|
||||
g_data_input_stream,
|
||||
G_TYPE_BUFFERED_INPUT_STREAM)
|
||||
|
||||
|
||||
static void
|
||||
@@ -73,8 +73,6 @@ g_data_input_stream_class_init (GDataInputStreamClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GDataInputStreamPrivate));
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
object_class->get_property = g_data_input_stream_get_property;
|
||||
object_class->set_property = g_data_input_stream_set_property;
|
||||
@@ -169,10 +167,7 @@ g_data_input_stream_get_property (GObject *object,
|
||||
static void
|
||||
g_data_input_stream_init (GDataInputStream *stream)
|
||||
{
|
||||
stream->priv = G_TYPE_INSTANCE_GET_PRIVATE (stream,
|
||||
G_TYPE_DATA_INPUT_STREAM,
|
||||
GDataInputStreamPrivate);
|
||||
|
||||
stream->priv = g_data_input_stream_get_private (stream);
|
||||
stream->priv->byte_order = G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN;
|
||||
stream->priv->newline_type = G_DATA_STREAM_NEWLINE_TYPE_LF;
|
||||
}
|
||||
|
Reference in New Issue
Block a user