[libsoup] Use g_type_is_a() in ugly hack.
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libsoup] Use g_type_is_a() in ugly hack.
- Date: Sun, 3 Jan 2010 15:47:42 +0000 (UTC)
commit 7e5fd868a281ab64d9c212c53f7481451767a1fc
Author: Benjamin Otte <otte gnome org>
Date: Sun Dec 20 14:55:00 2009 +0100
Use g_type_is_a() in ugly hack.
It's much faster and actually works reliably.
libsoup/soup-proxy-resolver.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/libsoup/soup-proxy-resolver.c b/libsoup/soup-proxy-resolver.c
index 33a908c..37a3b19 100644
--- a/libsoup/soup-proxy-resolver.c
+++ b/libsoup/soup-proxy-resolver.c
@@ -44,16 +44,14 @@ static void
proxy_resolver_interface_check (gpointer func_data, gpointer g_iface)
{
GTypeInterface *interface = g_iface;
- GTypeClass *klass;
if (interface->g_type != SOUP_TYPE_PROXY_RESOLVER)
return;
- klass = g_type_class_peek (interface->g_instance_type);
/* If the class hasn't already declared that it implements
* SoupProxyURIResolver, add our own compat implementation.
*/
- if (!g_type_interface_peek (klass, SOUP_TYPE_PROXY_URI_RESOLVER)) {
+ if (!g_type_is_a (interface->g_instance_type, SOUP_TYPE_PROXY_URI_RESOLVER)) {
const GInterfaceInfo uri_resolver_interface_info = {
(GInterfaceInitFunc) soup_proxy_resolver_uri_resolver_interface_init, NULL, NULL
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]