Ticket #329: 0001-ga_service_browser_new-should-accept-const-gchar.patch

File 0001-ga_service_browser_new-should-accept-const-gchar.patch, 2.4 KB (added by stefw, 4 years ago)

Patch which fixes the problem

  • avahi-gobject/ga-service-browser.c

    From ca581e1b9fd397d1121ea962c9d2bd432625eded Mon Sep 17 00:00:00 2001
    From: Stef Walter <stefw@collabora.co.uk>
    Date: Thu, 27 Jan 2011 11:23:38 -0600
    Subject: [PATCH] ga_service_browser_new() should accept const gchar*
    
    ga_service_browser_new() and ga_service_browser_new_full() should
    accept const gchar*.
    ---
     avahi-gobject/ga-service-browser.c |    4 ++--
     avahi-gobject/ga-service-browser.h |    4 ++--
     2 files changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/avahi-gobject/ga-service-browser.c b/avahi-gobject/ga-service-browser.c
    index abd03cd..3c3b80e 100644
    a b  
    330330    } 
    331331} 
    332332 
    333 GaServiceBrowser *ga_service_browser_new(gchar * type) { 
     333GaServiceBrowser *ga_service_browser_new(const gchar * type) { 
    334334    return ga_service_browser_new_full(AVAHI_IF_UNSPEC, 
    335335                                       AVAHI_PROTO_UNSPEC, type, NULL, 0); 
    336336} 
    337337 
    338338GaServiceBrowser *ga_service_browser_new_full(AvahiIfIndex interface, 
    339339                                              AvahiProtocol protocol, 
    340                                               gchar * type, gchar * domain, 
     340                                              const gchar * type, gchar * domain, 
    341341                                              GaLookupFlags flags) { 
    342342    return g_object_new(GA_TYPE_SERVICE_BROWSER, 
    343343                        "interface", interface, 
  • avahi-gobject/ga-service-browser.h

    diff --git a/avahi-gobject/ga-service-browser.h b/avahi-gobject/ga-service-browser.h
    index d625279..eaead4b 100644
    a b  
    5555#define GA_SERVICE_BROWSER_GET_CLASS(obj) \ 
    5656  (G_TYPE_INSTANCE_GET_CLASS ((obj), GA_TYPE_SERVICE_BROWSER, GaServiceBrowserClass)) 
    5757 
    58 GaServiceBrowser *ga_service_browser_new(gchar * type); 
     58GaServiceBrowser *ga_service_browser_new(const gchar * type); 
    5959 
    6060GaServiceBrowser *ga_service_browser_new_full(AvahiIfIndex interface, 
    6161                                              AvahiProtocol protocol, 
    62                                               gchar * type, gchar * domain, 
     62                                              const gchar * type, gchar * domain, 
    6363                                              GaLookupFlags flags); 
    6464 
    6565gboolean