gnome-objc 981002, compile fix (patch in glib)




Hi,

compiling gnome-objc fails because of name collision in glib.h.
Fix: renamed id to hook_id in glib.h and ghook.c

Patch follows:
----------------------------
diff -ur glib-dist/ghook.c glib/ghook.c
--- glib-dist/ghook.c	Wed Sep 30 10:56:00 1998
+++ glib/ghook.c	Fri Oct  2 13:28:42 1998
@@ -134,14 +134,14 @@
 
 gboolean
 g_hook_destroy (GHookList   *hook_list,
-		guint	     id)
+		guint	     hook_id)
 {
   GHook *hook;
   
   g_return_val_if_fail (hook_list != NULL, FALSE);
-  g_return_val_if_fail (id > 0, FALSE);
+  g_return_val_if_fail (hook_id > 0, FALSE);
   
-  hook = g_hook_get (hook_list, id);
+  hook = g_hook_get (hook_list, hook_id);
   if (hook)
     {
       g_hook_destroy_link (hook_list, hook);
@@ -408,17 +408,17 @@
 
 GHook*
 g_hook_get (GHookList *hook_list,
-	    guint      id)
+	    guint      hook_id)
 {
   GHook *hook;
   
   g_return_val_if_fail (hook_list != NULL, NULL);
-  g_return_val_if_fail (id > 0, NULL);
+  g_return_val_if_fail (hook_id > 0, NULL);
   
   hook = hook_list->hooks;
   while (hook)
     {
-      if (hook->id == id)
+      if (hook->id == hook_id)
 	return hook;
       hook = hook->next;
     }
diff -ur glib-dist/glib.h glib/glib.h
--- glib-dist/glib.h	Wed Sep 30 20:49:37 1998
+++ glib/glib.h	Fri Oct  2 13:26:52 1998
@@ -1058,7 +1058,7 @@
 void	 g_hook_unref			(GHookList		*hook_list,
 					 GHook			*hook);
 gboolean g_hook_destroy			(GHookList		*hook_list,
-					 guint			 id);
+					 guint			 hook_id);
 void	 g_hook_destroy_link		(GHookList		*hook_list,
 					 GHook			*hook);
 void	 g_hook_prepend			(GHookList		*hook_list,
@@ -1070,7 +1070,7 @@
 					 GHook			*hook,
 					 GHookCompareFunc	 func);
 GHook*	 g_hook_get			(GHookList		*hook_list,
-					 guint			 id);
+					 guint			 hook_id);
 GHook*	 g_hook_find			(GHookList		*hook_list,
 					 gboolean		 need_valids,
 					 GHookFindFunc		 func,
----------------------------
-- 
Kang-Jin Lee
lee@arco.met.fu-berlin.de



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