]> code.delx.au - gnu-emacs/blobdiff - src/w32fns.c
(Fgarbage_collect): Update call to truncate_undo_list.
[gnu-emacs] / src / w32fns.c
index 41bd6a9b9f987a84f9720c8ef17195bb307080fe..08780e05b1fc8b4366157e582cab51a6d9264fd8 100644 (file)
@@ -5607,14 +5607,12 @@ w32_font_match (fontname, pattern)
     char * fontname;
     char * pattern;
 {
-  char *font_name_copy;
   char *ptr;
-  Lisp_Object encoded_font_name;
+  char *font_name_copy;
   char *regex = alloca (strlen (pattern) * 2 + 3);
 
-  /* Convert fontname to unibyte for match.  */
-  encoded_font_name = string_make_unibyte (build_string (fontname));
-  font_name_copy = SDATA (encoded_font_name);
+  font_name_copy = alloca (strlen (fontname) + 1);
+  strcpy (font_name_copy, fontname);
 
   ptr = regex;
   *ptr++ = '^';
@@ -5652,8 +5650,8 @@ w32_font_match (fontname, pattern)
       return FALSE;
   }
 
-  return (fast_c_string_match_ignore_case (build_string (regex),
-                                           font_name_copy) >= 0);
+  return (fast_string_match_ignore_case (build_string (regex),
+                                         build_string(font_name_copy)) >= 0);
 }
 
 /* Callback functions, and a structure holding info they need, for