Commit 54cc4363 authored by Emmanuele Bassi's avatar Emmanuele Bassi

Rename the generated private data getter function

As it turns out, we have examples of internal functions called
type_name_get_private() in the wild (especially among older libraries),
so we need to use a name for the per-instance private data getter
function that hopefully won't conflict with anything.
parent 6000bc9e
......@@ -146,7 +146,7 @@ GType maman_bar_get_type (void);
G_DEFINE_TYPE_WITH_PRIVATE() macro, or use the G_ADD_PRIVATE()
macro with the G_DEFINE_TYPE_WITH_CODE() or the G_DEFINE_TYPE_EXTENDED()
macros. The private structure is then defined in the .c file,
and can be accessed using the <function>get_private()</function>
and can be accessed using the <function>get_instance_private()</function>
function generated by the G_DEFINE_TYPE_* macros.
<programlisting>
struct _MamanBarPrivate
......@@ -164,10 +164,10 @@ maman_bar_class_init (MamanBarClass *klass)
static void
maman_bar_init (MamanBar *self)
{
/* maman_bar_get_private() is generated by G_DEFINE_TYPE_WITH_PRIVATE()
/* maman_bar_get_instance_private() is generated by G_DEFINE_TYPE_WITH_PRIVATE()
* above, and it's local to the current compilation unit.
*/
MamanBarPrivate *priv = maman_bar_get_private (self);
MamanBarPrivate *priv = maman_bar_get_instance_private (self);
priv->hsize = 42;
}
......@@ -197,7 +197,7 @@ maman_bar_class_init (MamanBarClass *klass)
static void
maman_bar_init (MamanBar *self)
{
self->priv = maman_bar_get_private (self);
self->priv = maman_bar_get_instance_private (self);
self->priv->hsize = 42;
}
</para></listitem>
......@@ -330,7 +330,7 @@ maman_bar_class_init (MamanBarClass *klass)
static void
maman_bar_init (MamanBar *self)
{
self->priv = maman_bar_get_private (self);
self->priv = maman_bar_get_instance_private (self);
/* initialize all public and private members to reasonable default values. */
}
......@@ -471,7 +471,7 @@ maman_bar_class_init (MamanBarClass *klass)
static void
maman_bar_init (MamanBar *self);
{
self->priv = maman_bar_get_private (self);
self->priv = maman_bar_get_instance_private (self);
self->priv->an_object = g_object_new (MAMAN_TYPE_BAZ, NULL);
self->priv->a_string = g_strdup ("Maman");
......
......@@ -871,7 +871,7 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass)
static void
g_app_launch_context_init (GAppLaunchContext *context)
{
context->priv = g_app_launch_context_get_private (context);
context->priv = g_app_launch_context_get_instance_private (context);
}
/**
......
......@@ -693,7 +693,7 @@ g_application_finalize (GObject *object)
static void
g_application_init (GApplication *application)
{
application->priv = g_application_get_private (application);
application->priv = g_application_get_instance_private (application);
application->priv->actions = g_application_exported_actions_new (application);
......
......@@ -282,7 +282,7 @@ g_application_command_line_finalize (GObject *object)
static void
g_application_command_line_init (GApplicationCommandLine *cmdline)
{
cmdline->priv = g_application_command_line_get_private (cmdline);
cmdline->priv = g_application_command_line_get_instance_private (cmdline);
}
static void
......
......@@ -316,7 +316,7 @@ g_buffered_input_stream_seekable_iface_init (GSeekableIface *iface)
static void
g_buffered_input_stream_init (GBufferedInputStream *stream)
{
stream->priv = g_buffered_input_stream_get_private (stream);
stream->priv = g_buffered_input_stream_get_instance_private (stream);
}
......
......@@ -344,7 +344,7 @@ g_buffered_output_stream_finalize (GObject *object)
static void
g_buffered_output_stream_init (GBufferedOutputStream *stream)
{
stream->priv = g_buffered_output_stream_get_private (stream);
stream->priv = g_buffered_output_stream_get_instance_private (stream);
}
static void
......
......@@ -151,7 +151,7 @@ g_cancellable_class_init (GCancellableClass *klass)
static void
g_cancellable_init (GCancellable *cancellable)
{
cancellable->priv = g_cancellable_get_private (cancellable);
cancellable->priv = g_cancellable_get_instance_private (cancellable);
}
/**
......
......@@ -205,7 +205,7 @@ g_converter_input_stream_get_property (GObject *object,
static void
g_converter_input_stream_init (GConverterInputStream *stream)
{
stream->priv = g_converter_input_stream_get_private (stream);
stream->priv = g_converter_input_stream_get_instance_private (stream);
}
/**
......
......@@ -221,7 +221,7 @@ g_converter_output_stream_get_property (GObject *object,
static void
g_converter_output_stream_init (GConverterOutputStream *stream)
{
stream->priv = g_converter_output_stream_get_private (stream);
stream->priv = g_converter_output_stream_get_instance_private (stream);
}
/**
......
......@@ -167,7 +167,7 @@ g_data_input_stream_get_property (GObject *object,
static void
g_data_input_stream_init (GDataInputStream *stream)
{
stream->priv = g_data_input_stream_get_private (stream);
stream->priv = g_data_input_stream_get_instance_private (stream);
stream->priv->byte_order = G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN;
stream->priv->newline_type = G_DATA_STREAM_NEWLINE_TYPE_LF;
}
......
......@@ -157,7 +157,7 @@ g_data_output_stream_get_property (GObject *object,
static void
g_data_output_stream_init (GDataOutputStream *stream)
{
stream->priv = g_data_output_stream_get_private (stream);
stream->priv = g_data_output_stream_get_instance_private (stream);
stream->priv->byte_order = G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN;
}
......
......@@ -1795,7 +1795,7 @@ class CodeGenerator:
self.c.write('static void\n'
'%s_proxy_init (%sProxy *proxy)\n'
'{\n'
' proxy->priv = %s_proxy_get_private (proxy);\n'
' proxy->priv = %s_proxy_get_instance_private (proxy);\n'
' g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), %s_interface_info ());\n'
'}\n'
'\n'
......@@ -2533,7 +2533,7 @@ class CodeGenerator:
self.c.write('static void\n'
'%s_skeleton_init (%sSkeleton *skeleton)\n'
'{\n'
' skeleton->priv = %s_skeleton_get_private (skeleton);\n'
' skeleton->priv = %s_skeleton_get_instance_private (skeleton);\n'
%(i.name_lower, i.camel_name,
i.name_lower))
self.c.write(' g_mutex_init (&skeleton->priv->lock);\n')
......
......@@ -224,7 +224,7 @@ mech_compare_func (Mechanism *a, Mechanism *b)
static void
_g_dbus_auth_init (GDBusAuth *auth)
{
auth->priv = _g_dbus_auth_get_private (auth);
auth->priv = _g_dbus_auth_get_instance_private (auth);
}
static void
......
......@@ -159,7 +159,7 @@ _g_dbus_auth_mechanism_class_init (GDBusAuthMechanismClass *klass)
static void
_g_dbus_auth_mechanism_init (GDBusAuthMechanism *mechanism)
{
mechanism->priv = _g_dbus_auth_mechanism_get_private (mechanism);
mechanism->priv = _g_dbus_auth_mechanism_get_instance_private (mechanism);
}
/* ---------------------------------------------------------------------------------------------------- */
......
......@@ -114,7 +114,7 @@ _g_dbus_auth_mechanism_anon_class_init (GDBusAuthMechanismAnonClass *klass)
static void
_g_dbus_auth_mechanism_anon_init (GDBusAuthMechanismAnon *mechanism)
{
mechanism->priv = _g_dbus_auth_mechanism_anon_get_private (mechanism);
mechanism->priv = _g_dbus_auth_mechanism_anon_get_instance_private (mechanism);
}
/* ---------------------------------------------------------------------------------------------------- */
......
......@@ -121,7 +121,7 @@ _g_dbus_auth_mechanism_external_class_init (GDBusAuthMechanismExternalClass *kla
static void
_g_dbus_auth_mechanism_external_init (GDBusAuthMechanismExternal *mechanism)
{
mechanism->priv = _g_dbus_auth_mechanism_external_get_private (mechanism);
mechanism->priv = _g_dbus_auth_mechanism_external_get_instance_private (mechanism);
}
/* ---------------------------------------------------------------------------------------------------- */
......
......@@ -142,7 +142,7 @@ _g_dbus_auth_mechanism_sha1_class_init (GDBusAuthMechanismSha1Class *klass)
static void
_g_dbus_auth_mechanism_sha1_init (GDBusAuthMechanismSha1 *mechanism)
{
mechanism->priv = _g_dbus_auth_mechanism_sha1_get_private (mechanism);
mechanism->priv = _g_dbus_auth_mechanism_sha1_get_instance_private (mechanism);
}
/* ---------------------------------------------------------------------------------------------------- */
......
......@@ -259,7 +259,7 @@ g_dbus_interface_skeleton_class_init (GDBusInterfaceSkeletonClass *klass)
static void
g_dbus_interface_skeleton_init (GDBusInterfaceSkeleton *interface)
{
interface->priv = g_dbus_interface_skeleton_get_private (interface);
interface->priv = g_dbus_interface_skeleton_get_instance_private (interface);
g_mutex_init (&interface->priv->lock);
}
......
......@@ -570,7 +570,7 @@ g_dbus_object_manager_client_class_init (GDBusObjectManagerClientClass *klass)
static void
g_dbus_object_manager_client_init (GDBusObjectManagerClient *manager)
{
manager->priv = g_dbus_object_manager_client_get_private (manager);
manager->priv = g_dbus_object_manager_client_get_instance_private (manager);
g_mutex_init (&manager->priv->lock);
manager->priv->map_object_path_to_object_proxy = g_hash_table_new_full (g_str_hash,
g_str_equal,
......
......@@ -226,7 +226,7 @@ g_dbus_object_manager_server_class_init (GDBusObjectManagerServerClass *klass)
static void
g_dbus_object_manager_server_init (GDBusObjectManagerServer *manager)
{
manager->priv = g_dbus_object_manager_server_get_private (manager);
manager->priv = g_dbus_object_manager_server_get_instance_private (manager);
g_mutex_init (&manager->priv->lock);
manager->priv->map_object_path_to_data = g_hash_table_new_full (g_str_hash,
g_str_equal,
......
......@@ -183,7 +183,7 @@ g_dbus_object_proxy_class_init (GDBusObjectProxyClass *klass)
static void
g_dbus_object_proxy_init (GDBusObjectProxy *proxy)
{
proxy->priv = g_dbus_object_proxy_get_private (proxy);
proxy->priv = g_dbus_object_proxy_get_instance_private (proxy);
g_mutex_init (&proxy->priv->lock);
proxy->priv->map_name_to_iface = g_hash_table_new_full (g_str_hash,
g_str_equal,
......
......@@ -202,7 +202,7 @@ g_dbus_object_skeleton_class_init (GDBusObjectSkeletonClass *klass)
static void
g_dbus_object_skeleton_init (GDBusObjectSkeleton *object)
{
object->priv = g_dbus_object_skeleton_get_private (object);
object->priv = g_dbus_object_skeleton_get_instance_private (object);
g_mutex_init (&object->priv->lock);
object->priv->map_name_to_iface = g_hash_table_new_full (g_str_hash,
g_str_equal,
......
......@@ -638,7 +638,7 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass)
static void
g_dbus_proxy_init (GDBusProxy *proxy)
{
proxy->priv = g_dbus_proxy_get_private (proxy);
proxy->priv = g_dbus_proxy_get_instance_private (proxy);
proxy->priv->signal_subscription_data = g_slice_new0 (SignalSubscriptionData);
proxy->priv->signal_subscription_data->ref_count = 1;
proxy->priv->signal_subscription_data->proxy = proxy;
......
......@@ -443,7 +443,7 @@ g_delayed_settings_backend_class_init (GDelayedSettingsBackendClass *class)
static void
g_delayed_settings_backend_init (GDelayedSettingsBackend *delayed)
{
delayed->priv = g_delayed_settings_backend_get_private (delayed);
delayed->priv = g_delayed_settings_backend_get_instance_private (delayed);
delayed->priv->delayed = g_settings_backend_create_tree ();
g_mutex_init (&delayed->priv->lock);
}
......
......@@ -139,7 +139,7 @@ g_emblemed_icon_class_init (GEmblemedIconClass *klass)
static void
g_emblemed_icon_init (GEmblemedIcon *emblemed)
{
emblemed->priv = g_emblemed_icon_get_private (emblemed);
emblemed->priv = g_emblemed_icon_get_instance_private (emblemed);
}
/**
......
......@@ -172,7 +172,7 @@ g_file_enumerator_class_init (GFileEnumeratorClass *klass)
static void
g_file_enumerator_init (GFileEnumerator *enumerator)
{
enumerator->priv = g_file_enumerator_get_private (enumerator);
enumerator->priv = g_file_enumerator_get_instance_private (enumerator);
}
/**
......
......@@ -102,7 +102,7 @@ g_file_input_stream_seekable_iface_init (GSeekableIface *iface)
static void
g_file_input_stream_init (GFileInputStream *stream)
{
stream->priv = g_file_input_stream_get_private (stream);
stream->priv = g_file_input_stream_get_instance_private (stream);
}
/**
......
......@@ -107,7 +107,7 @@ g_file_io_stream_seekable_iface_init (GSeekableIface *iface)
static void
g_file_io_stream_init (GFileIOStream *stream)
{
stream->priv = g_file_io_stream_get_private (stream);
stream->priv = g_file_io_stream_get_instance_private (stream);
}
/**
......
......@@ -265,7 +265,7 @@ g_file_monitor_class_init (GFileMonitorClass *klass)
static void
g_file_monitor_init (GFileMonitor *monitor)
{
monitor->priv = g_file_monitor_get_private (monitor);
monitor->priv = g_file_monitor_get_instance_private (monitor);
monitor->priv->rate_limit_msec = DEFAULT_RATE_LIMIT_MSECS;
monitor->priv->rate_limiter = g_hash_table_new_full (g_file_hash, (GEqualFunc)g_file_equal,
NULL, (GDestroyNotify) rate_limiter_free);
......
......@@ -106,7 +106,7 @@ g_file_output_stream_seekable_iface_init (GSeekableIface *iface)
static void
g_file_output_stream_init (GFileOutputStream *stream)
{
stream->priv = g_file_output_stream_get_private (stream);
stream->priv = g_file_output_stream_get_instance_private (stream);
}
/**
......
......@@ -149,7 +149,7 @@ g_filter_input_stream_get_property (GObject *object,
GFilterInputStreamPrivate *priv;
filter_stream = G_FILTER_INPUT_STREAM (object);
priv = g_filter_input_stream_get_private (filter_stream);
priv = g_filter_input_stream_get_instance_private (filter_stream);
switch (prop_id)
{
......@@ -217,7 +217,7 @@ g_filter_input_stream_get_close_base_stream (GFilterInputStream *stream)
g_return_val_if_fail (G_IS_FILTER_INPUT_STREAM (stream), FALSE);
priv = g_filter_input_stream_get_private (stream);
priv = g_filter_input_stream_get_instance_private (stream);
return priv->close_base;
}
......@@ -239,7 +239,7 @@ g_filter_input_stream_set_close_base_stream (GFilterInputStream *stream,
close_base = !!close_base;
priv = g_filter_input_stream_get_private (stream);
priv = g_filter_input_stream_get_instance_private (stream);
if (priv->close_base != close_base)
{
......@@ -297,7 +297,7 @@ g_filter_input_stream_close (GInputStream *stream,
GError **error)
{
GFilterInputStream *filter_stream = G_FILTER_INPUT_STREAM (stream);
GFilterInputStreamPrivate *priv = g_filter_input_stream_get_private (filter_stream);
GFilterInputStreamPrivate *priv = g_filter_input_stream_get_instance_private (filter_stream);
gboolean res = TRUE;
if (priv->close_base)
......
......@@ -148,7 +148,7 @@ g_filter_output_stream_get_property (GObject *object,
GFilterOutputStreamPrivate *priv;
filter_stream = G_FILTER_OUTPUT_STREAM (object);
priv = g_filter_output_stream_get_private (filter_stream);
priv = g_filter_output_stream_get_instance_private (filter_stream);
switch (prop_id)
{
......@@ -221,7 +221,7 @@ g_filter_output_stream_get_close_base_stream (GFilterOutputStream *stream)
g_return_val_if_fail (G_IS_FILTER_OUTPUT_STREAM (stream), FALSE);
priv = g_filter_output_stream_get_private (stream);
priv = g_filter_output_stream_get_instance_private (stream);
return priv->close_base;
}
......@@ -243,7 +243,7 @@ g_filter_output_stream_set_close_base_stream (GFilterOutputStream *stream,
close_base = !!close_base;
priv = g_filter_output_stream_get_private (stream);
priv = g_filter_output_stream_get_instance_private (stream);
if (priv->close_base != close_base)
{
......@@ -296,7 +296,7 @@ g_filter_output_stream_close (GOutputStream *stream,
GError **error)
{
GFilterOutputStream *filter_stream = G_FILTER_OUTPUT_STREAM (stream);
GFilterOutputStreamPrivate *priv = g_filter_output_stream_get_private (filter_stream);
GFilterOutputStreamPrivate *priv = g_filter_output_stream_get_instance_private (filter_stream);
gboolean res = TRUE;
if (priv->close_base)
......
......@@ -367,7 +367,7 @@ g_inet_address_class_init (GInetAddressClass *klass)
static void
g_inet_address_init (GInetAddress *address)
{
address->priv = g_inet_address_get_private (address);
address->priv = g_inet_address_get_instance_private (address);
}
/**
......
......@@ -237,7 +237,7 @@ g_inet_address_mask_initable_iface_init (GInitableIface *iface)
static void
g_inet_address_mask_init (GInetAddressMask *mask)
{
mask->priv = g_inet_address_mask_get_private (mask);
mask->priv = g_inet_address_mask_get_instance_private (mask);
}
/**
......
......@@ -305,7 +305,7 @@ g_inet_socket_address_class_init (GInetSocketAddressClass *klass)
static void
g_inet_socket_address_init (GInetSocketAddress *address)
{
address->priv = g_inet_socket_address_get_private (address);
address->priv = g_inet_socket_address_get_instance_private (address);
}
/**
......
......@@ -119,7 +119,7 @@ g_input_stream_class_init (GInputStreamClass *klass)
static void
g_input_stream_init (GInputStream *stream)
{
stream->priv = g_input_stream_get_private (stream);
stream->priv = g_input_stream_get_instance_private (stream);
}
/**
......
......@@ -108,7 +108,7 @@ g_io_stream_dispose (GObject *object)
static void
g_io_stream_init (GIOStream *stream)
{
stream->priv = g_io_stream_get_private (stream);
stream->priv = g_io_stream_get_instance_private (stream);
}
static void
......
......@@ -127,7 +127,7 @@ g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface)
static void
g_local_file_input_stream_init (GLocalFileInputStream *info)
{
info->priv = g_local_file_input_stream_get_private (info);
info->priv = g_local_file_input_stream_get_instance_private (info);
info->priv->do_close = TRUE;
}
......
......@@ -165,7 +165,7 @@ g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface)
static void
g_local_file_output_stream_init (GLocalFileOutputStream *stream)
{
stream->priv = g_local_file_output_stream_get_private (stream);
stream->priv = g_local_file_output_stream_get_instance_private (stream);
stream->priv->do_close = TRUE;
}
......
......@@ -164,7 +164,7 @@ g_memory_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface)
static void
g_memory_input_stream_init (GMemoryInputStream *stream)
{
stream->priv = g_memory_input_stream_get_private (stream);
stream->priv = g_memory_input_stream_get_instance_private (stream);
}
/**
......
......@@ -325,7 +325,7 @@ g_memory_output_stream_seekable_iface_init (GSeekableIface *iface)
static void
g_memory_output_stream_init (GMemoryOutputStream *stream)
{
stream->priv = g_memory_output_stream_get_private (stream);
stream->priv = g_memory_output_stream_get_instance_private (stream);
stream->priv->pos = 0;
stream->priv->valid_len = 0;
}
......
......@@ -851,7 +851,7 @@ g_menu_attribute_iter_finalize (GObject *object)
static void
g_menu_attribute_iter_init (GMenuAttributeIter *iter)
{
iter->priv = g_menu_attribute_iter_get_private (iter);
iter->priv = g_menu_attribute_iter_get_instance_private (iter);
}
static void
......@@ -1005,7 +1005,7 @@ g_menu_link_iter_finalize (GObject *object)
static void
g_menu_link_iter_init (GMenuLinkIter *iter)
{
iter->priv = g_menu_link_iter_get_private (iter);
iter->priv = g_menu_link_iter_get_instance_private (iter);
}
static void
......
......@@ -511,7 +511,7 @@ g_mount_operation_class_init (GMountOperationClass *klass)
static void
g_mount_operation_init (GMountOperation *operation)
{
operation->priv = g_mount_operation_get_private (operation);
operation->priv = g_mount_operation_get_instance_private (operation);
}
/**
......
......@@ -160,7 +160,7 @@ g_network_address_connectable_iface_init (GSocketConnectableIface *connectable_i
static void
g_network_address_init (GNetworkAddress *addr)
{
addr->priv = g_network_address_get_private (addr);
addr->priv = g_network_address_get_instance_private (addr);
}
static void
......
......@@ -74,7 +74,7 @@ G_DEFINE_TYPE_WITH_CODE (GNetworkMonitorBase, g_network_monitor_base, G_TYPE_OBJ
static void
g_network_monitor_base_init (GNetworkMonitorBase *monitor)
{
monitor->priv = g_network_monitor_base_get_private (monitor);
monitor->priv = g_network_monitor_base_get_instance_private (monitor);
monitor->priv->networks = g_ptr_array_new_with_free_func (g_object_unref);
monitor->priv->context = g_main_context_get_thread_default ();
if (monitor->priv->context)
......
......@@ -73,7 +73,7 @@ G_DEFINE_TYPE_WITH_CODE (GNetworkMonitorNetlink, g_network_monitor_netlink, G_TY
static void
g_network_monitor_netlink_init (GNetworkMonitorNetlink *nl)
{
nl->priv = g_network_monitor_netlink_get_private (nl);
nl->priv = g_network_monitor_netlink_get_instance_private (nl);
}
......
......@@ -166,7 +166,7 @@ g_network_service_connectable_iface_init (GSocketConnectableIface *connectable_i
static void
g_network_service_init (GNetworkService *srv)
{
srv->priv = g_network_service_get_private (srv);
srv->priv = g_network_service_get_instance_private (srv);
}
static void
......
......@@ -134,7 +134,7 @@ g_output_stream_class_init (GOutputStreamClass *klass)
static void
g_output_stream_init (GOutputStream *stream)
{
stream->priv = g_output_stream_get_private (stream);
stream->priv = g_output_stream_get_instance_private (stream);
}
/**
......
......@@ -375,7 +375,7 @@ g_permission_get_property (GObject *object, guint prop_id,
static void
g_permission_init (GPermission *permission)
{
permission->priv = g_permission_get_private (permission);
permission->priv = g_permission_get_instance_private (permission);
}
static gboolean
......
......@@ -275,7 +275,7 @@ g_proxy_address_class_init (GProxyAddressClass *klass)
static void
g_proxy_address_init (GProxyAddress *proxy)
{
proxy->priv = g_proxy_address_get_private (proxy);
proxy->priv = g_proxy_address_get_instance_private (proxy);
proxy->priv->protocol = NULL;
proxy->priv->username = NULL;
proxy->priv->password = NULL;
......
......@@ -697,7 +697,7 @@ g_proxy_address_enumerator_finalize (GObject *object)
static void
g_proxy_address_enumerator_init (GProxyAddressEnumerator *self)
{
self->priv = g_proxy_address_enumerator_get_private (self);
self->priv = g_proxy_address_enumerator_get_instance_private (self);
}
static void
......
......@@ -177,7 +177,7 @@ g_resolver_init (GResolver *resolver)
struct stat st;
#endif
resolver->priv = g_resolver_get_private (resolver);
resolver->priv = g_resolver_get_instance_private (resolver);
#ifdef G_OS_UNIX
if (stat (_PATH_RESCONF, &st) == 0)
......
......@@ -603,7 +603,7 @@ g_settings_finalize (GObject *object)
static void
g_settings_init (GSettings *settings)
{
settings->priv = g_settings_get_private (settings);
settings->priv = g_settings_get_instance_private (settings);
settings->priv->main_context = g_main_context_ref_thread_default ();
}
......
......@@ -906,7 +906,7 @@ ignore_subscription (GSettingsBackend *backend,
static void
g_settings_backend_init (GSettingsBackend *backend)
{
backend->priv = g_settings_backend_get_private (backend);
backend->priv = g_settings_backend_get_instance_private (backend);
g_mutex_init (&backend->priv->lock);
}
......
......@@ -252,7 +252,7 @@ g_simple_action_group_finalize (GObject *object)
static void
g_simple_action_group_init (GSimpleActionGroup *simple)
{
simple->priv = g_simple_action_group_get_private (simple);
simple->priv = g_simple_action_group_get_instance_private (simple);
simple->priv->table = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, g_object_unref);
}
......
......@@ -97,7 +97,7 @@ g_simple_proxy_resolver_finalize (GObject *object)
static void
g_simple_proxy_resolver_init (GSimpleProxyResolver *resolver)
{
resolver->priv = g_simple_proxy_resolver_get_private (resolver);
resolver->priv = g_simple_proxy_resolver_get_instance_private (resolver);
resolver->priv->uri_proxies = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, g_free);
}
......
......@@ -962,7 +962,7 @@ g_socket_initable_iface_init (GInitableIface *iface)
static void
g_socket_init (GSocket *socket)
{
socket->priv = g_socket_get_private (socket);
socket->priv = g_socket_get_instance_private (socket);
socket->priv->fd = -1;
socket->priv->blocking = TRUE;
......
......@@ -199,7 +199,7 @@ clarify_connect_error (GError *error,
static void
g_socket_client_init (GSocketClient *client)
{
client->priv = g_socket_client_get_private (client);
client->priv = g_socket_client_get_instance_private (client);
client->priv->type = G_SOCKET_TYPE_STREAM;
client->priv->app_proxies = g_hash_table_new_full (g_str_hash,
g_str_equal,
......
......@@ -425,7 +425,7 @@ g_socket_connection_class_init (GSocketConnectionClass *klass)
static void
g_socket_connection_init (GSocketConnection *connection)
{
connection->priv = g_socket_connection_get_private (connection);
connection->priv = g_socket_connection_get_instance_private (connection);
}
static gboolean
......
......@@ -217,7 +217,7 @@ g_socket_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface)
static void
g_socket_input_stream_init (GSocketInputStream *stream)
{
stream->priv = g_socket_input_stream_get_private (stream);
stream->priv = g_socket_input_stream_get_instance_private (stream);
}
GSocketInputStream *
......
......@@ -154,7 +154,7 @@ g_socket_listener_class_init (GSocketListenerClass *klass)
static void
g_socket_listener_init (GSocketListener *listener)
{
listener->priv = g_socket_listener_get_private (listener);
listener->priv = g_socket_listener_get_instance_private (listener);
listener->priv->sockets =
g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
listener->priv->listen_backlog = 10;
......
......@@ -221,7 +221,7 @@ g_socket_output_stream_pollable_iface_init (GPollableOutputStreamInterface *ifac
static void
g_socket_output_stream_init (GSocketOutputStream *stream)
{
stream->priv = g_socket_output_stream_get_private (stream);
stream->priv = g_socket_output_stream_get_instance_private (stream);
}
GSocketOutputStream *
......
......@@ -93,7 +93,7 @@ g_socket_service_real_incoming (GSocketService *service,