[libsoup] SoupProxyResolver: remove evil hack



commit d10215fcc77e2bace075104b8ef4bc48ad63f5f8
Author: Dan Winship <danw gnome org>
Date:   Mon Nov 5 12:55:48 2012 -0500

    SoupProxyResolver: remove evil hack
    
    Back when I deprecated SoupProxyResolver in favor of
    SoupProxyURIResolver, I added an evil hack so that if anyone created a
    SoupProxyResolver implementation, we'd automatically add a
    SoupProxyURIResolver implementation on top of it (so that SoupSession
    only needed to worry about SoupProxyURIResolver).
    
    Anyway, (a) it's evil, (b) I'm pretty sure no one else ever
    implemented a SoupProxyResolver anyway, and (c) if they did, they
    really ought to have migrated to SoupProxyURIResolver by now.
    
    So, remove the evil hack so that desrt can drop support for adding
    interfaces after class_init.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=687659

 libsoup/soup-proxy-resolver.c |   31 -------------------------------
 1 files changed, 0 insertions(+), 31 deletions(-)
---
diff --git a/libsoup/soup-proxy-resolver.c b/libsoup/soup-proxy-resolver.c
index 8092175..7512278 100644
--- a/libsoup/soup-proxy-resolver.c
+++ b/libsoup/soup-proxy-resolver.c
@@ -20,39 +20,8 @@ G_DEFINE_INTERFACE_WITH_CODE (SoupProxyResolver, soup_proxy_resolver, G_TYPE_OBJ
 			      )
 
 static void
-proxy_resolver_interface_check (gpointer func_data, gpointer g_iface)
-{
-	GTypeInterface *iface = g_iface;
-
-	if (iface->g_type != SOUP_TYPE_PROXY_RESOLVER)
-		return;
-
-	/* If the class hasn't already declared that it implements
-	 * SoupProxyURIResolver, add our own compat implementation.
-	 */
-	if (!g_type_is_a (iface->g_instance_type, SOUP_TYPE_PROXY_URI_RESOLVER)) {
-		const GInterfaceInfo uri_resolver_interface_info = {
-			(GInterfaceInitFunc) soup_proxy_resolver_uri_resolver_interface_init, NULL, NULL
-		};
-		g_type_add_interface_static (iface->g_instance_type,
-					     SOUP_TYPE_PROXY_URI_RESOLVER,
-					     &uri_resolver_interface_info);
-	}
-}
-
-
-static void
 soup_proxy_resolver_default_init (SoupProxyResolverInterface *iface)
 {
-	/* Add an interface_check where we can kludgily add the
-	 * SoupProxyURIResolver interface to all SoupProxyResolvers.
-	 * (SoupProxyResolver can't just implement
-	 * SoupProxyURIResolver itself because interface types can't
-	 * implement other interfaces.) This is an ugly hack, but it
-	 * only gets used if someone actually creates a
-	 * SoupProxyResolver...
-	 */
-	g_type_add_interface_check (NULL, proxy_resolver_interface_check);
 }
 
 void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]