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.
This commit is contained in:
Emmanuele Bassi 2013-06-24 15:43:04 +01:00
parent 6000bc9ea8
commit 54cc43630d
79 changed files with 101 additions and 101 deletions

View File

@ -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");

View File

@ -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);
}
/**

View File

@ -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);

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -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);
}
/**

View File

@ -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);
}
/**

View File

@ -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);
}
/**

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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')

View File

@ -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

View File

@ -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);
}
/* ---------------------------------------------------------------------------------------------------- */

View File

@ -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);
}
/* ---------------------------------------------------------------------------------------------------- */

View File

@ -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);
}
/* ---------------------------------------------------------------------------------------------------- */

View File

@ -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);
}
/* ---------------------------------------------------------------------------------------------------- */

View File

@ -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);
}

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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;

View File

@ -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);
}

View File

@ -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);
}
/**

View File

@ -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);
}
/**

View File

@ -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);
}
/**

View File

@ -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);
}
/**

View File

@ -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);

View File

@ -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);
}
/**

View File

@ -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)

View File

@ -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)

View File

@ -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);
}
/**

View File

@ -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);
}
/**

View File

@ -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);
}
/**

View File

@ -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);
}
/**

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);
}
/**

View File

@ -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;
}

View File

@ -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

View File

@ -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);
}
/**

View File

@ -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

View File

@ -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)

View File

@ -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);
}

View File

@ -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

View File

@ -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);
}
/**

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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)

View File

@ -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 ();
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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,

View File

@ -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

View File

@ -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 *

View File

@ -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;

View File

@ -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 *

View File

@ -93,7 +93,7 @@ g_socket_service_real_incoming (GSocketService *service,
static void
g_socket_service_init (GSocketService *service)
{
service->priv = g_socket_service_get_private (service);
service->priv = g_socket_service_get_instance_private (service);
service->priv->cancellable = g_cancellable_new ();
service->priv->active = TRUE;
}

View File

@ -74,7 +74,7 @@ enum
static void
g_tcp_connection_init (GTcpConnection *connection)
{
connection->priv = g_tcp_connection_get_private (connection);
connection->priv = g_tcp_connection_get_instance_private (connection);
connection->priv->graceful_disconnect = FALSE;
}

View File

@ -147,7 +147,7 @@ g_tcp_wrapper_connection_class_init (GTcpWrapperConnectionClass *klass)
static void
g_tcp_wrapper_connection_init (GTcpWrapperConnection *connection)
{
connection->priv = g_tcp_wrapper_connection_get_private (connection);
connection->priv = g_tcp_wrapper_connection_get_instance_private (connection);
}
/**

View File

@ -436,7 +436,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (GTestDBus, g_test_dbus, G_TYPE_OBJECT)
static void
g_test_dbus_init (GTestDBus *self)
{
self->priv = g_test_dbus_get_private (self);
self->priv = g_test_dbus_get_instance_private (self);
self->priv->service_dirs = g_ptr_array_new_with_free_func (g_free);
}

View File

@ -134,7 +134,7 @@ g_threaded_socket_service_incoming (GSocketService *service,
static void
g_threaded_socket_service_init (GThreadedSocketService *service)
{
service->priv = g_threaded_socket_service_get_private (service);
service->priv = g_threaded_socket_service_get_instance_private (service);
service->priv->max_threads = 10;
}

View File

@ -185,7 +185,7 @@ invoke_closure_wait_and_free (InvokeClosure *closure,
static void
g_tls_interaction_init (GTlsInteraction *interaction)
{
interaction->priv = g_tls_interaction_get_private (interaction);
interaction->priv = g_tls_interaction_get_instance_private (interaction);
interaction->priv->context = g_main_context_ref_thread_default ();
}

View File

@ -70,7 +70,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (GTlsPassword, g_tls_password, G_TYPE_OBJECT)
static void
g_tls_password_init (GTlsPassword *password)
{
password->priv = g_tls_password_get_private (password);
password->priv = g_tls_password_get_instance_private (password);
}
static const guchar *

View File

@ -214,7 +214,7 @@ g_unix_credentials_message_finalize (GObject *object)
static void
g_unix_credentials_message_init (GUnixCredentialsMessage *message)
{
message->priv = g_unix_credentials_message_get_private (message);
message->priv = g_unix_credentials_message_get_instance_private (message);
}
static void

View File

@ -53,7 +53,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (GUnixFDList, g_unix_fd_list, G_TYPE_OBJECT)
static void
g_unix_fd_list_init (GUnixFDList *list)
{
list->priv = g_unix_fd_list_get_private (list);
list->priv = g_unix_fd_list_get_instance_private (list);
}
static void

View File

@ -181,7 +181,7 @@ g_unix_fd_message_get_property (GObject *object, guint prop_id,
static void
g_unix_fd_message_init (GUnixFDMessage *message)
{
message->priv = g_unix_fd_message_get_private (message);
message->priv = g_unix_fd_message_get_instance_private (message);
}
static void

View File

@ -238,7 +238,7 @@ g_unix_input_stream_get_property (GObject *object,
static void
g_unix_input_stream_init (GUnixInputStream *unix_stream)
{
unix_stream->priv = g_unix_input_stream_get_private (unix_stream);
unix_stream->priv = g_unix_input_stream_get_instance_private (unix_stream);
unix_stream->priv->fd = -1;
unix_stream->priv->close_fd = TRUE;
}

View File

@ -223,7 +223,7 @@ g_unix_output_stream_get_property (GObject *object,
static void
g_unix_output_stream_init (GUnixOutputStream *unix_stream)
{
unix_stream->priv = g_unix_output_stream_get_private (unix_stream);
unix_stream->priv = g_unix_output_stream_get_instance_private (unix_stream);
unix_stream->priv->fd = -1;
unix_stream->priv->close_fd = TRUE;
}

View File

@ -304,7 +304,7 @@ g_unix_socket_address_class_init (GUnixSocketAddressClass *klass)
static void
g_unix_socket_address_init (GUnixSocketAddress *address)
{
address->priv = g_unix_socket_address_get_private (address);
address->priv = g_unix_socket_address_get_instance_private (address);
memset (address->priv->path, 0, sizeof (address->priv->path));
address->priv->path_len = -1;

View File

@ -172,7 +172,7 @@ g_win32_input_stream_get_property (GObject *object,
static void
g_win32_input_stream_init (GWin32InputStream *win32_stream)
{
win32_stream->priv = g_win32_input_stream_get_private (win32_stream);
win32_stream->priv = g_win32_input_stream_get_instance_private (win32_stream);
win32_stream->priv->handle = NULL;
win32_stream->priv->close_handle = TRUE;
}

View File

@ -174,7 +174,7 @@ g_win32_output_stream_get_property (GObject *object,
static void
g_win32_output_stream_init (GWin32OutputStream *win32_stream)
{
win32_stream->priv = g_win32_output_stream_get_private (win32_stream);
win32_stream->priv = g_win32_output_stream_get_instance_private (win32_stream);
win32_stream->priv->handle = NULL;
win32_stream->priv->close_handle = TRUE;
}

View File

@ -1556,7 +1556,7 @@ guint g_type_get_type_registration_serial (void);
* gint
* my_object_get_foo (MyObject *obj)
* {
* MyObjectPrivate *priv = my_object_get_private (obj);
* MyObjectPrivate *priv = my_object_get_instance_private (obj);
*
* return priv->foo;
* }
@ -1565,7 +1565,7 @@ guint g_type_get_type_registration_serial (void);
* my_object_set_bar (MyObject *obj,
* gint bar)
* {
* MyObjectPrivate *priv = my_object_get_private (obj);
* MyObjectPrivate *priv = my_object_get_instance_private (obj);
*
* if (priv->bar != bar)
* priv->bar = bar;
@ -1651,7 +1651,7 @@ static void type_name##_class_intern_init (gpointer klass) \
} \
\
static inline gpointer \
type_name##_get_private (TypeName *self) \
type_name##_get_instance_private (TypeName *self) \
{ \
return (G_STRUCT_MEMBER_P (self, TypeName##_private_offset)); \
} \

View File

@ -26,7 +26,7 @@ test_object_class_init (TestObjectClass *klass)
static void
test_object_init (TestObject *self)
{
TestObjectPrivate *priv = test_object_get_private (self);
TestObjectPrivate *priv = test_object_get_instance_private (self);
if (g_test_verbose ())
g_print ("Offset of %sPrivate for type '%s': %d\n",
@ -41,7 +41,7 @@ test_object_init (TestObject *self)
static int
test_object_get_dummy_0 (TestObject *self)
{
TestObjectPrivate *priv = test_object_get_private (self);
TestObjectPrivate *priv = test_object_get_instance_private (self);
return priv->dummy_0;
}
@ -49,7 +49,7 @@ test_object_get_dummy_0 (TestObject *self)
static float
test_object_get_dummy_1 (TestObject *self)
{
TestObjectPrivate *priv = test_object_get_private (self);
TestObjectPrivate *priv = test_object_get_instance_private (self);
return priv->dummy_1;
}
@ -74,7 +74,7 @@ G_DEFINE_TYPE_WITH_CODE (TestDerived, test_derived, test_object_get_type (),
static void
test_derived_finalize (GObject *obj)
{
TestDerivedPrivate *priv = test_derived_get_private ((TestDerived *) obj);
TestDerivedPrivate *priv = test_derived_get_instance_private ((TestDerived *) obj);
g_free (priv->dummy_2);
@ -90,7 +90,7 @@ test_derived_class_init (TestDerivedClass *klass)
static void
test_derived_init (TestDerived *self)
{
TestDerivedPrivate *priv = test_derived_get_private (self);
TestDerivedPrivate *priv = test_derived_get_instance_private (self);
if (g_test_verbose ())
g_print ("Offset of %sPrivate for type '%s': %d\n",
@ -104,7 +104,7 @@ test_derived_init (TestDerived *self)
static const char *
test_derived_get_dummy_2 (TestDerived *self)
{
TestDerivedPrivate *priv = test_derived_get_private (self);
TestDerivedPrivate *priv = test_derived_get_instance_private (self);
return priv->dummy_2;
}
@ -178,7 +178,7 @@ test_mixed_derived_class_init (TestMixedDerivedClass *klass)
static void
test_mixed_derived_init (TestMixedDerived *self)
{
TestMixedDerivedPrivate *priv = test_mixed_derived_get_private (self);
TestMixedDerivedPrivate *priv = test_mixed_derived_get_instance_private (self);
if (g_test_verbose ())
g_print ("Offset of %sPrivate for type '%s': %d\n",
@ -192,7 +192,7 @@ test_mixed_derived_init (TestMixedDerived *self)
static gint64
test_mixed_derived_get_dummy_4 (TestMixedDerived *self)
{
TestMixedDerivedPrivate *priv = test_mixed_derived_get_private (self);
TestMixedDerivedPrivate *priv = test_mixed_derived_get_instance_private (self);
return priv->dummy_4;
}