changeset 5192:635f4b506855

Call internal_hash() with its new arg, Win32-specific code, fixing build src/ChangeLog addition: 2010-04-06 Aidan Kehoe <kehoea@parhasard.net> * toolbar-msw.c (allocate_toolbar_item_id) (mswindows_output_toolbar): * menubar-msw.c (allocate_menu_item_id, checksum_menu_item): * glyphs-msw.c (mswindows_image_instance_hash): * fontcolor-msw.c (mswindows_color_instance_equal): * device-msw.c (hash_devmode): Call internal_hash() with the correct number of arguments, declare various hash methods with the correct number of arguments, fixing the Win32 build. Thank you Vin.
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 06 Apr 2010 15:08:22 +0100
parents 71ee43b8a74d
children 41ac827cb71b
files src/ChangeLog src/device-msw.c src/fontcolor-msw.c src/glyphs-msw.c src/menubar-msw.c src/toolbar-msw.c
diffstat 6 files changed, 26 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Apr 05 13:03:35 2010 +0100
+++ b/src/ChangeLog	Tue Apr 06 15:08:22 2010 +0100
@@ -1,3 +1,15 @@
+2010-04-06  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* toolbar-msw.c (allocate_toolbar_item_id)
+	(mswindows_output_toolbar):
+	* menubar-msw.c (allocate_menu_item_id, checksum_menu_item): 
+	* glyphs-msw.c (mswindows_image_instance_hash):
+	* fontcolor-msw.c (mswindows_color_instance_equal):
+	* device-msw.c (hash_devmode):
+	Call internal_hash() with the correct number of arguments, declare
+	various hash methods with the correct number of arguments, fixing
+	the Win32 build. Thank you Vin.
+
 2010-04-04  Ben Wing  <ben@xemacs.org>
 
 	* font-mgr.c:
--- a/src/device-msw.c	Mon Apr 05 13:03:35 2010 +0100
+++ b/src/device-msw.c	Tue Apr 06 15:08:22 2010 +0100
@@ -1185,14 +1185,14 @@
 }
 
 static Hashcode
-hash_devmode (Lisp_Object obj, int depth)
+hash_devmode (Lisp_Object obj, int depth, Boolint UNUSED (equalp))
 {
   Lisp_Devmode *dm = XDEVMODE (obj);
 
   return HASH3 (XDEVMODE_SIZE (dm),
 		dm->devmode ? memory_hash (dm->devmode, XDEVMODE_SIZE (dm))
 		: 0,
-		internal_hash (dm->printer_name, depth + 1));
+		internal_hash (dm->printer_name, depth + 1, 0));
 }
 
 DEFINE_NODUMP_LISP_OBJECT ("msprinter-settings", devmode,
--- a/src/fontcolor-msw.c	Mon Apr 05 13:03:35 2010 +0100
+++ b/src/fontcolor-msw.c	Tue Apr 06 15:08:22 2010 +0100
@@ -1393,8 +1393,7 @@
 }
 
 static Hashcode
-mswindows_color_instance_hash (Lisp_Color_Instance *c, int UNUSED (depth),
-                               Boolint UNUSED (equalp))
+mswindows_color_instance_hash (Lisp_Color_Instance *c, int UNUSED (depth))
 {
   return (unsigned long) COLOR_INSTANCE_MSWINDOWS_COLOR (c);
 }
--- a/src/glyphs-msw.c	Mon Apr 05 13:03:35 2010 +0100
+++ b/src/glyphs-msw.c	Tue Apr 06 15:08:22 2010 +0100
@@ -2168,8 +2168,7 @@
 }
 
 static Hashcode
-mswindows_image_instance_hash (Lisp_Image_Instance *p, int UNUSED (depth),
-                               Boolint UNUSED (equalp))
+mswindows_image_instance_hash (Lisp_Image_Instance *p, int UNUSED (depth))
 {
   switch (IMAGE_INSTANCE_TYPE (p))
     {
--- a/src/menubar-msw.c	Mon Apr 05 13:03:35 2010 +0100
+++ b/src/menubar-msw.c	Tue Apr 06 15:08:22 2010 +0100
@@ -160,9 +160,9 @@
 static Lisp_Object
 allocate_menu_item_id (Lisp_Object path, Lisp_Object name, Lisp_Object suffix)
 {
-  UINT id = MENU_ITEM_ID_BITS (HASH3 (internal_hash (path, 0),
-				      internal_hash (name, 0),
-				      internal_hash (suffix, 0)));
+  UINT id = MENU_ITEM_ID_BITS (HASH3 (internal_hash (path, 0, 0),
+				      internal_hash (name, 0, 0),
+				      internal_hash (suffix, 0, 0)));
   do {
       id = MENU_ITEM_ID_BITS (id + 1);
   } while (GetMenuState (top_level_menu, id, MF_BYCOMMAND) != 0xFFFFFFFF);
@@ -202,18 +202,18 @@
       if (separator_string_p (XSTRING_DATA (item)))
 	return 13;
       else
-	return internal_hash (item, 0) + 13;
+	return internal_hash (item, 0, 0) + 13;
     }
   else if (CONSP (item))
     {
       /* Submenu - hash by its string name + 0 */
-      return internal_hash (XCAR (item), 0);
+      return internal_hash (XCAR (item), 0, 0);
     }
   else if (VECTORP (item))
     {
       /* An ordinary item - hash its name and callback form. */
-      return HASH2 (internal_hash (XVECTOR_DATA(item)[0], 0),
-		    internal_hash (XVECTOR_DATA(item)[1], 0));
+      return HASH2 (internal_hash (XVECTOR_DATA(item)[0], 0, 0),
+		    internal_hash (XVECTOR_DATA(item)[1], 0, 0));
     }
 
   /* An error - will be caught later */
--- a/src/toolbar-msw.c	Mon Apr 05 13:03:35 2010 +0100
+++ b/src/toolbar-msw.c	Tue Apr 06 15:08:22 2010 +0100
@@ -66,7 +66,7 @@
 			  enum edge_pos UNUSED (pos))
 {
   /* hmm what do we generate an id based on */
-  int id = TOOLBAR_ITEM_ID_BITS (internal_hash (button->callback, 0));
+  int id = TOOLBAR_ITEM_ID_BITS (internal_hash (button->callback, 0, 0));
   while (!NILP (Fgethash (make_int (id),
 			  FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f), Qnil)))
     {
@@ -187,8 +187,8 @@
 
       struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
       checksum = HASH5 (checksum, 
-			internal_hash (get_toolbar_button_glyph (w, tb), 0),
-			internal_hash (tb->callback, 0),
+			internal_hash (get_toolbar_button_glyph (w, tb), 0, 0),
+			internal_hash (tb->callback, 0, 0),
 			width,
 			LISP_HASH (w->toolbar_buttons_captioned_p));
       button = tb->next;