emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r108993: Optimize pure C strings init


From: Dmitry Antipov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108993: Optimize pure C strings initialization.
Date: Tue, 10 Jul 2012 12:43:46 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108993
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Tue 2012-07-10 12:43:46 +0400
message:
  Optimize pure C strings initialization.
  * lisp.h (make_pure_string): Fix prototype.
  (build_pure_c_string): New function, defined as static inline.  This
  provides a better opportunity to optimize away calls to strlen when
  the function is called with compile-time constant argument.
  * alloc.c (make_pure_c_string): Fix comment.  Change to add nchars
  argument, adjust users accordingly.  Use build_pure_c_string where
  appropriate.
  * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
  * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
  * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
modified:
  src/ChangeLog
  src/alloc.c
  src/buffer.c
  src/coding.c
  src/data.c
  src/dbusbind.c
  src/fileio.c
  src/fontset.c
  src/frame.c
  src/keyboard.c
  src/keymap.c
  src/lisp.h
  src/lread.c
  src/search.c
  src/syntax.c
  src/w32fns.c
  src/xdisp.c
  src/xfaces.c
  src/xfns.c
  src/xterm.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-07-10 07:59:31 +0000
+++ b/src/ChangeLog     2012-07-10 08:43:46 +0000
@@ -1,5 +1,19 @@
 2012-07-10  Dmitry Antipov  <address@hidden>
 
+       Optimize pure C strings initialization.
+       * lisp.h (make_pure_string): Fix prototype.
+       (build_pure_c_string): New function, defined as static inline.  This
+       provides a better opportunity to optimize away calls to strlen when
+       the function is called with compile-time constant argument.
+       * alloc.c (make_pure_c_string): Fix comment.  Change to add nchars
+       argument, adjust users accordingly.  Use build_pure_c_string where
+       appropriate.
+       * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
+       * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
+       * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
+
+2012-07-10  Dmitry Antipov  <address@hidden>
+
        Avoid calls to strlen in miscellaneous functions.
        * buffer.c (init_buffer): Use precalculated len, adjust if needed.
        * font.c (Ffont_xlfd_name): Likewise.  Change to call make_string.

=== modified file 'src/alloc.c'
--- a/src/alloc.c       2012-07-09 16:06:19 +0000
+++ b/src/alloc.c       2012-07-10 08:43:46 +0000
@@ -5212,15 +5212,14 @@
   return string;
 }
 
-/* Return a string a string allocated in pure space.  Do not allocate
-   the string data, just point to DATA.  */
+/* Return a string allocated in pure space.  Do not
+   allocate the string data, just point to DATA.  */
 
 Lisp_Object
-make_pure_c_string (const char *data)
+make_pure_c_string (const char *data, ptrdiff_t nchars)
 {
   Lisp_Object string;
   struct Lisp_String *s;
-  ptrdiff_t nchars = strlen (data);
 
   s = (struct Lisp_String *) pure_alloc (sizeof *s, Lisp_String);
   s->size = nchars;
@@ -6842,7 +6841,7 @@
      not be able to allocate the memory to hold it.  */
   Vmemory_signal_data
     = pure_cons (Qerror,
-                pure_cons (make_pure_c_string ("Memory exhausted--use M-x 
save-some-buffers then exit and restart Emacs"), Qnil));
+                pure_cons (build_pure_c_string ("Memory exhausted--use M-x 
save-some-buffers then exit and restart Emacs"), Qnil));
 
   DEFVAR_LISP ("memory-full", Vmemory_full,
               doc: /* Non-nil means Emacs cannot get much more Lisp memory.  
*/);

=== modified file 'src/buffer.c'
--- a/src/buffer.c      2012-07-10 07:59:31 +0000
+++ b/src/buffer.c      2012-07-10 08:43:46 +0000
@@ -4898,7 +4898,7 @@
   /* Must do these before making the first buffer! */
 
   /* real setup is done in bindings.el */
-  BVAR (&buffer_defaults, mode_line_format) = make_pure_c_string ("%-");
+  BVAR (&buffer_defaults, mode_line_format) = build_pure_c_string ("%-");
   BVAR (&buffer_defaults, header_line_format) = Qnil;
   BVAR (&buffer_defaults, abbrev_mode) = Qnil;
   BVAR (&buffer_defaults, overwrite_mode) = Qnil;
@@ -5028,7 +5028,7 @@
   current_buffer = 0;
   all_buffers = 0;
 
-  QSFundamental = make_pure_c_string ("Fundamental");
+  QSFundamental = build_pure_c_string ("Fundamental");
 
   Qfundamental_mode = intern_c_string ("fundamental-mode");
   BVAR (&buffer_defaults, major_mode) = Qfundamental_mode;
@@ -5043,10 +5043,10 @@
   Fput (Qkill_buffer_hook, Qpermanent_local, Qt);
 
   /* super-magic invisible buffer */
-  Vprin1_to_string_buffer = Fget_buffer_create (make_pure_c_string (" prin1"));
+  Vprin1_to_string_buffer = Fget_buffer_create (build_pure_c_string (" 
prin1"));
   Vbuffer_alist = Qnil;
 
-  Fset_buffer (Fget_buffer_create (make_pure_c_string ("*scratch*")));
+  Fset_buffer (Fget_buffer_create (build_pure_c_string ("*scratch*")));
 
   inhibit_modification_hooks = 0;
 }
@@ -5201,7 +5201,7 @@
   Fput (Qprotected_field, Qerror_conditions,
        pure_cons (Qprotected_field, pure_cons (Qerror, Qnil)));
   Fput (Qprotected_field, Qerror_message,
-       make_pure_c_string ("Attempt to modify a protected field"));
+       build_pure_c_string ("Attempt to modify a protected field"));
 
   DEFVAR_BUFFER_DEFAULTS ("default-mode-line-format",
                          mode_line_format,

=== modified file 'src/coding.c'
--- a/src/coding.c      2012-07-05 18:35:48 +0000
+++ b/src/coding.c      2012-07-10 08:43:46 +0000
@@ -10350,7 +10350,7 @@
   Vcode_conversion_reused_workbuf = Qnil;
 
   staticpro (&Vcode_conversion_workbuf_name);
-  Vcode_conversion_workbuf_name = make_pure_c_string (" 
*code-conversion-work*");
+  Vcode_conversion_workbuf_name = build_pure_c_string (" 
*code-conversion-work*");
 
   reused_workbuf_in_use = 0;
 
@@ -10413,7 +10413,7 @@
   Fput (Qcoding_system_error, Qerror_conditions,
        pure_cons (Qcoding_system_error, pure_cons (Qerror, Qnil)));
   Fput (Qcoding_system_error, Qerror_message,
-       make_pure_c_string ("Invalid coding system"));
+       build_pure_c_string ("Invalid coding system"));
 
   /* Intern this now in case it isn't already done.
      Setting this variable twice is harmless.
@@ -10686,22 +10686,22 @@
   DEFVAR_LISP ("eol-mnemonic-unix", eol_mnemonic_unix,
               doc: /*
 *String displayed in mode line for UNIX-like (LF) end-of-line format.  */);
-  eol_mnemonic_unix = make_pure_c_string (":");
+  eol_mnemonic_unix = build_pure_c_string (":");
 
   DEFVAR_LISP ("eol-mnemonic-dos", eol_mnemonic_dos,
               doc: /*
 *String displayed in mode line for DOS-like (CRLF) end-of-line format.  */);
-  eol_mnemonic_dos = make_pure_c_string ("\\");
+  eol_mnemonic_dos = build_pure_c_string ("\\");
 
   DEFVAR_LISP ("eol-mnemonic-mac", eol_mnemonic_mac,
               doc: /*
 *String displayed in mode line for MAC-like (CR) end-of-line format.  */);
-  eol_mnemonic_mac = make_pure_c_string ("/");
+  eol_mnemonic_mac = build_pure_c_string ("/");
 
   DEFVAR_LISP ("eol-mnemonic-undecided", eol_mnemonic_undecided,
               doc: /*
 *String displayed in mode line when end-of-line format is not yet determined.  
*/);
-  eol_mnemonic_undecided = make_pure_c_string (":");
+  eol_mnemonic_undecided = build_pure_c_string (":");
 
   DEFVAR_LISP ("enable-character-translation", Venable_character_translation,
               doc: /*
@@ -10839,7 +10839,7 @@
     plist[10] = intern_c_string (":for-unibyte");
     plist[11] = args[coding_arg_for_unibyte] = Qt;
     plist[12] = intern_c_string (":docstring");
-    plist[13] = make_pure_c_string ("Do no conversion.\n\
+    plist[13] = build_pure_c_string ("Do no conversion.\n\
 \n\
 When you visit a file with this coding, the file is read into a\n\
 unibyte buffer as is, thus each byte of a file is treated as a\n\
@@ -10857,7 +10857,7 @@
     plist[8] = intern_c_string (":charset-list");
     plist[9] = args[coding_arg_charset_list] = Fcons (Qascii, Qnil);
     plist[11] = args[coding_arg_for_unibyte] = Qnil;
-    plist[13] = make_pure_c_string ("No conversion on encoding, automatic 
conversion on decoding.");
+    plist[13] = build_pure_c_string ("No conversion on encoding, automatic 
conversion on decoding.");
     plist[15] = args[coding_arg_eol_type] = Qnil;
     args[coding_arg_plist] = Flist (16, plist);
     Fdefine_coding_system_internal (coding_arg_max, args);

=== modified file 'src/data.c'
--- a/src/data.c        2012-07-05 18:35:48 +0000
+++ b/src/data.c        2012-07-10 08:43:46 +0000
@@ -3011,11 +3011,11 @@
   Fput (Qerror, Qerror_conditions,
        error_tail);
   Fput (Qerror, Qerror_message,
-       make_pure_c_string ("error"));
+       build_pure_c_string ("error"));
 
 #define PUT_ERROR(sym, tail, msg)                      \
   Fput (sym, Qerror_conditions, pure_cons (sym, tail)); \
-  Fput (sym, Qerror_message, make_pure_c_string (msg))
+  Fput (sym, Qerror_message, build_pure_c_string (msg))
 
   PUT_ERROR (Qquit, Qnil, "Quit");
 
@@ -3042,7 +3042,7 @@
 
   arith_tail = pure_cons (Qarith_error, error_tail);
   Fput (Qarith_error, Qerror_conditions, arith_tail);
-  Fput (Qarith_error, Qerror_message, make_pure_c_string ("Arithmetic error"));
+  Fput (Qarith_error, Qerror_message, build_pure_c_string ("Arithmetic 
error"));
 
   PUT_ERROR (Qbeginning_of_buffer, error_tail, "Beginning of buffer");
   PUT_ERROR (Qend_of_buffer, error_tail, "End of buffer");

=== modified file 'src/dbusbind.c'
--- a/src/dbusbind.c    2012-07-09 12:02:27 +0000
+++ b/src/dbusbind.c    2012-07-10 08:43:46 +0000
@@ -1712,7 +1712,7 @@
   Fput (Qdbus_error, Qerror_conditions,
        list2 (Qdbus_error, Qerror));
   Fput (Qdbus_error, Qerror_message,
-       make_pure_c_string ("D-Bus error"));
+       build_pure_c_string ("D-Bus error"));
 
   DEFSYM (QCdbus_system_bus, ":system");
   DEFSYM (QCdbus_session_bus, ":session");
@@ -1744,7 +1744,7 @@
               Vdbus_compiled_version,
     doc: /* The version of D-Bus Emacs is compiled against.  */);
 #ifdef DBUS_VERSION_STRING
-  Vdbus_compiled_version = make_pure_c_string (DBUS_VERSION_STRING);
+  Vdbus_compiled_version = build_pure_c_string (DBUS_VERSION_STRING);
 #else
   Vdbus_compiled_version = Qnil;
 #endif

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2012-07-10 06:23:45 +0000
+++ b/src/fileio.c      2012-07-10 08:43:46 +0000
@@ -5647,17 +5647,17 @@
   Fput (Qfile_error, Qerror_conditions,
        Fpurecopy (list2 (Qfile_error, Qerror)));
   Fput (Qfile_error, Qerror_message,
-       make_pure_c_string ("File error"));
+       build_pure_c_string ("File error"));
 
   Fput (Qfile_already_exists, Qerror_conditions,
        Fpurecopy (list3 (Qfile_already_exists, Qfile_error, Qerror)));
   Fput (Qfile_already_exists, Qerror_message,
-       make_pure_c_string ("File already exists"));
+       build_pure_c_string ("File already exists"));
 
   Fput (Qfile_date_error, Qerror_conditions,
        Fpurecopy (list3 (Qfile_date_error, Qfile_error, Qerror)));
   Fput (Qfile_date_error, Qerror_message,
-       make_pure_c_string ("Cannot set file date"));
+       build_pure_c_string ("Cannot set file date"));
 
   DEFVAR_LISP ("file-name-handler-alist", Vfile_name_handler_alist,
               doc: /* Alist of elements (REGEXP . HANDLER) for file names 
handled specially.

=== modified file 'src/fontset.c'
--- a/src/fontset.c     2012-07-05 18:35:48 +0000
+++ b/src/fontset.c     2012-07-10 08:43:46 +0000
@@ -2164,7 +2164,7 @@
   staticpro (&Vdefault_fontset);
   FONTSET_ID (Vdefault_fontset) = make_number (0);
   FONTSET_NAME (Vdefault_fontset)
-    = make_pure_c_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default");
+    = build_pure_c_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default");
   ASET (Vfontset_table, 0, Vdefault_fontset);
   next_fontset_id = 1;
 
@@ -2210,7 +2210,7 @@
   DEFVAR_LISP ("fontset-alias-alist", Vfontset_alias_alist,
               doc: /* Alist of fontset names vs the aliases.  */);
   Vfontset_alias_alist = Fcons (Fcons (FONTSET_NAME (Vdefault_fontset),
-                                      make_pure_c_string ("fontset-default")),
+                                      build_pure_c_string ("fontset-default")),
                                Qnil);
 
   DEFVAR_LISP ("vertical-centering-font-regexp",

=== modified file 'src/frame.c'
--- a/src/frame.c       2012-07-09 12:02:27 +0000
+++ b/src/frame.c       2012-07-10 08:43:46 +0000
@@ -477,7 +477,7 @@
   Vframe_list = Fcons (frame, Vframe_list);
 
   tty_frame_count = 1;
-  f->name = make_pure_c_string ("F1");
+  f->name = build_pure_c_string ("F1");
 
   f->visible = 1;
   f->async_visible = 1;

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2012-07-05 18:35:48 +0000
+++ b/src/keyboard.c    2012-07-10 08:43:46 +0000
@@ -11441,7 +11441,7 @@
   pending_funcalls = Qnil;
   staticpro (&pending_funcalls);
 
-  Vlispy_mouse_stem = make_pure_c_string ("mouse");
+  Vlispy_mouse_stem = build_pure_c_string ("mouse");
   staticpro (&Vlispy_mouse_stem);
 
   /* Tool-bars.  */

=== modified file 'src/keymap.c'
--- a/src/keymap.c      2012-07-05 18:35:48 +0000
+++ b/src/keymap.c      2012-07-10 08:43:46 +0000
@@ -3705,11 +3705,11 @@
   Ffset (intern_c_string ("Control-X-prefix"), control_x_map);
 
   exclude_keys
-    = pure_cons (pure_cons (make_pure_c_string ("DEL"), make_pure_c_string 
("\\d")),
-                pure_cons (pure_cons (make_pure_c_string ("TAB"), 
make_pure_c_string ("\\t")),
-                   pure_cons (pure_cons (make_pure_c_string ("RET"), 
make_pure_c_string ("\\r")),
-                          pure_cons (pure_cons (make_pure_c_string ("ESC"), 
make_pure_c_string ("\\e")),
-                                 pure_cons (pure_cons (make_pure_c_string 
("SPC"), make_pure_c_string (" ")),
+    = pure_cons (pure_cons (build_pure_c_string ("DEL"), build_pure_c_string 
("\\d")),
+                pure_cons (pure_cons (build_pure_c_string ("TAB"), 
build_pure_c_string ("\\t")),
+                   pure_cons (pure_cons (build_pure_c_string ("RET"), 
build_pure_c_string ("\\r")),
+                          pure_cons (pure_cons (build_pure_c_string ("ESC"), 
build_pure_c_string ("\\e")),
+                                 pure_cons (pure_cons (build_pure_c_string 
("SPC"), build_pure_c_string (" ")),
                                         Qnil)))));
   staticpro (&exclude_keys);
 

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2012-07-09 16:38:45 +0000
+++ b/src/lisp.h        2012-07-10 08:43:46 +0000
@@ -2626,7 +2626,15 @@
 extern Lisp_Object make_specified_string (const char *,
                                          ptrdiff_t, ptrdiff_t, int);
 extern Lisp_Object make_pure_string (const char *, ptrdiff_t, ptrdiff_t, int);
-extern Lisp_Object make_pure_c_string (const char *data);
+extern Lisp_Object make_pure_c_string (const char *, ptrdiff_t);
+
+/* Make a string allocated in pure space, use STR as string data.  */
+
+static inline Lisp_Object
+build_pure_c_string (const char *str)
+{
+  return make_pure_c_string (str, strlen (str));
+}
 
 /* Make a string from the data at STR, treating it as multibyte if the
    data warrants.  */

=== modified file 'src/lread.c'
--- a/src/lread.c       2012-07-10 07:59:31 +0000
+++ b/src/lread.c       2012-07-10 08:43:46 +0000
@@ -3700,7 +3700,7 @@
        with the extra copy.  */
     abort ();
 
-  return Fintern (make_pure_c_string (str), obarray);
+  return Fintern (make_pure_c_string (str, len), obarray);
 }
 
 DEFUN ("intern", Fintern, Sintern, 1, 2, 0,
@@ -3941,7 +3941,7 @@
   initial_obarray = Vobarray;
   staticpro (&initial_obarray);
 
-  Qunbound = Fmake_symbol (make_pure_c_string ("unbound"));
+  Qunbound = Fmake_symbol (build_pure_c_string ("unbound"));
   /* Set temporary dummy values to Qnil and Vpurify_flag to satisfy the
      NILP (Vpurify_flag) check in intern_c_string.  */
   Qnil = make_number (-1); Vpurify_flag = make_number (1);
@@ -4441,8 +4441,8 @@
 This list should not include the empty string.
 `load' and related functions try to append these suffixes, in order,
 to the specified file name if a Lisp suffix is allowed or required.  */);
-  Vload_suffixes = Fcons (make_pure_c_string (".elc"),
-                         Fcons (make_pure_c_string (".el"), Qnil));
+  Vload_suffixes = Fcons (build_pure_c_string (".elc"),
+                         Fcons (build_pure_c_string (".el"), Qnil));
   DEFVAR_LISP ("load-file-rep-suffixes", Vload_file_rep_suffixes,
               doc: /* List of suffixes that indicate representations of \
 the same file.
@@ -4575,7 +4575,7 @@
 When the regular expression matches, the file is considered to be safe
 to load.  See also `load-dangerous-libraries'.  */);
   Vbytecomp_version_regexp
-    = make_pure_c_string ("^;;;.\\(in Emacs version\\|bytecomp version 
FSF\\)");
+    = build_pure_c_string ("^;;;.\\(in Emacs version\\|bytecomp version 
FSF\\)");
 
   Qlexical_binding = intern ("lexical-binding");
   staticpro (&Qlexical_binding);

=== modified file 'src/search.c'
--- a/src/search.c      2012-07-05 18:35:48 +0000
+++ b/src/search.c      2012-07-10 08:43:46 +0000
@@ -3056,12 +3056,12 @@
   Fput (Qsearch_failed, Qerror_conditions,
        pure_cons (Qsearch_failed, pure_cons (Qerror, Qnil)));
   Fput (Qsearch_failed, Qerror_message,
-       make_pure_c_string ("Search failed"));
+       build_pure_c_string ("Search failed"));
 
   Fput (Qinvalid_regexp, Qerror_conditions,
        pure_cons (Qinvalid_regexp, pure_cons (Qerror, Qnil)));
   Fput (Qinvalid_regexp, Qerror_message,
-       make_pure_c_string ("Invalid regexp"));
+       build_pure_c_string ("Invalid regexp"));
 
   last_thing_searched = Qnil;
   staticpro (&last_thing_searched);

=== modified file 'src/syntax.c'
--- a/src/syntax.c      2012-07-05 18:35:48 +0000
+++ b/src/syntax.c      2012-07-10 08:43:46 +0000
@@ -3475,7 +3475,7 @@
   Fput (Qscan_error, Qerror_conditions,
        pure_cons (Qscan_error, pure_cons (Qerror, Qnil)));
   Fput (Qscan_error, Qerror_message,
-       make_pure_c_string ("Scan error"));
+       build_pure_c_string ("Scan error"));
 
   DEFVAR_BOOL ("parse-sexp-ignore-comments", parse_sexp_ignore_comments,
               doc: /* Non-nil means `forward-sexp', etc., should treat 
comments as whitespace.  */);

=== modified file 'src/w32fns.c'
--- a/src/w32fns.c      2012-07-06 20:00:42 +0000
+++ b/src/w32fns.c      2012-07-10 08:43:46 +0000
@@ -6798,7 +6798,7 @@
   Fput (Qundefined_color, Qerror_conditions,
        pure_cons (Qundefined_color, pure_cons (Qerror, Qnil)));
   Fput (Qundefined_color, Qerror_message,
-       make_pure_c_string ("Undefined color"));
+       build_pure_c_string ("Undefined color"));
 
   staticpro (&w32_grabbed_keys);
   w32_grabbed_keys = Qnil;

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-07-09 12:02:27 +0000
+++ b/src/xdisp.c       2012-07-10 08:43:46 +0000
@@ -28728,7 +28728,7 @@
   staticpro (&echo_area_buffer[0]);
   staticpro (&echo_area_buffer[1]);
 
-  Vmessages_buffer_name = make_pure_c_string ("*Messages*");
+  Vmessages_buffer_name = build_pure_c_string ("*Messages*");
   staticpro (&Vmessages_buffer_name);
 
   mode_line_proptrans_alist = Qnil;
@@ -28809,7 +28809,7 @@
   DEFVAR_LISP ("overlay-arrow-string", Voverlay_arrow_string,
     doc: /* String to display as an arrow in non-window frames.
 See also `overlay-arrow-position'.  */);
-  Voverlay_arrow_string = make_pure_c_string ("=>");
+  Voverlay_arrow_string = build_pure_c_string ("=>");
 
   DEFVAR_LISP ("overlay-arrow-variable-list", Voverlay_arrow_variable_list,
     doc: /* List of variables (symbols) which hold markers for overlay arrows.
@@ -28915,10 +28915,10 @@
   Vicon_title_format
     = Vframe_title_format
     = pure_cons (intern_c_string ("multiple-frames"),
-                pure_cons (make_pure_c_string ("%b"),
+                pure_cons (build_pure_c_string ("%b"),
                            pure_cons (pure_cons (empty_unibyte_string,
                                                  pure_cons (intern_c_string 
("invocation-name"),
-                                                            pure_cons 
(make_pure_c_string ("@"),
+                                                            pure_cons 
(build_pure_c_string ("@"),
                                                                        
pure_cons (intern_c_string ("system-name"),
                                                                                
   Qnil)))),
                                       Qnil)));

=== modified file 'src/xfaces.c'
--- a/src/xfaces.c      2012-07-07 19:23:41 +0000
+++ b/src/xfaces.c      2012-07-10 08:43:46 +0000
@@ -6643,7 +6643,7 @@
 This stipple pattern is used on monochrome displays
 instead of shades of gray for a face background color.
 See `set-face-stipple' for possible values for this variable.  */);
-  Vface_default_stipple = make_pure_c_string ("gray3");
+  Vface_default_stipple = build_pure_c_string ("gray3");
 
   DEFVAR_LISP ("tty-defined-color-alist", Vtty_defined_color_alist,
    doc: /* An alist of defined terminal colors and their RGB values.

=== modified file 'src/xfns.c'
--- a/src/xfns.c        2012-07-06 20:00:42 +0000
+++ b/src/xfns.c        2012-07-10 08:43:46 +0000
@@ -5828,7 +5828,7 @@
   Fput (Qundefined_color, Qerror_conditions,
        pure_cons (Qundefined_color, pure_cons (Qerror, Qnil)));
   Fput (Qundefined_color, Qerror_message,
-       make_pure_c_string ("Undefined color"));
+       build_pure_c_string ("Undefined color"));
 
   DEFVAR_LISP ("x-pointer-shape", Vx_pointer_shape,
     doc: /* The shape of the pointer when over text.

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2012-07-05 18:35:48 +0000
+++ b/src/xterm.c       2012-07-10 08:43:46 +0000
@@ -10845,7 +10845,7 @@
   last_mouse_press_frame = Qnil;
 
 #ifdef USE_GTK
-  xg_default_icon_file = make_pure_c_string 
("icons/hicolor/scalable/apps/emacs.svg");
+  xg_default_icon_file = build_pure_c_string 
("icons/hicolor/scalable/apps/emacs.svg");
   staticpro (&xg_default_icon_file);
 
   DEFSYM (Qx_gtk_map_stock, "x-gtk-map-stock");


reply via email to

[Prev in Thread] Current Thread [Next in Thread]