aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov <[email protected]>2012-07-10 12:43:46 +0400
committerDmitry Antipov <[email protected]>2012-07-10 12:43:46 +0400
commit2a0213a6d0a9e36a388994445837e051d0bbe5f9 (patch)
treeb7e4d5c2ef5d4061e083ef2123c1fc72ad46d93d /src
parentcb1caeaf2ba26df05e8f9bcd4aa63203cef781fb (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog14
-rw-r--r--src/alloc.c9
-rw-r--r--src/buffer.c10
-rw-r--r--src/coding.c16
-rw-r--r--src/data.c6
-rw-r--r--src/dbusbind.c4
-rw-r--r--src/fileio.c6
-rw-r--r--src/fontset.c4
-rw-r--r--src/frame.c2
-rw-r--r--src/keyboard.c2
-rw-r--r--src/keymap.c10
-rw-r--r--src/lisp.h10
-rw-r--r--src/lread.c10
-rw-r--r--src/search.c4
-rw-r--r--src/syntax.c2
-rw-r--r--src/w32fns.c2
-rw-r--r--src/xdisp.c8
-rw-r--r--src/xfaces.c2
-rw-r--r--src/xfns.c2
-rw-r--r--src/xterm.c2
20 files changed, 73 insertions, 52 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5815c83ae1..b0f000cadd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,19 @@
2012-07-10 Dmitry Antipov <[email protected]>
+ 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 <[email protected]>
+
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.
diff --git a/src/alloc.c b/src/alloc.c
index a5c2e20d0c..52d683a1b6 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5212,15 +5212,14 @@ make_pure_string (const char *data,
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 @@ do hash-consing of the objects allocated to pure space. */);
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. */);
diff --git a/src/buffer.c b/src/buffer.c
index 4999639128..f06a2a5ea0 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -4898,7 +4898,7 @@ init_buffer_once (void)
/* 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 @@ init_buffer_once (void)
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 @@ init_buffer_once (void)
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 @@ syms_of_buffer (void)
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,
diff --git a/src/coding.c b/src/coding.c
index 4b2a974012..8210cacc4d 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -10350,7 +10350,7 @@ syms_of_coding (void)
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 @@ syms_of_coding (void)
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 @@ Also used for decoding keyboard input on X Window system. */);
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 @@ internal character representation. */);
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 @@ character.");
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);
diff --git a/src/data.c b/src/data.c
index faa87d0013..4b342c0f52 100644
--- a/src/data.c
+++ b/src/data.c
@@ -3011,11 +3011,11 @@ syms_of_data (void)
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 @@ syms_of_data (void)
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");
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 203a25c151..86013d92c0 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -1712,7 +1712,7 @@ syms_of_dbusbind (void)
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 @@ syms_of_dbusbind (void)
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
diff --git a/src/fileio.c b/src/fileio.c
index 532ab6097e..5d4ee1bde0 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5647,17 +5647,17 @@ of file names regardless of the current language environment. */);
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.
diff --git a/src/fontset.c b/src/fontset.c
index cfaa24124f..bd5956d2be 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -2164,7 +2164,7 @@ syms_of_fontset (void)
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 @@ alternate fontnames (if any) are tried instead. */);
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",
diff --git a/src/frame.c b/src/frame.c
index be5631da77..61baa25be3 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -477,7 +477,7 @@ make_initial_frame (void)
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;
diff --git a/src/keyboard.c b/src/keyboard.c
index 93f073986f..71c8d869ec 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -11441,7 +11441,7 @@ syms_of_keyboard (void)
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. */
diff --git a/src/keymap.c b/src/keymap.c
index 234740721a..cfc1e2e495 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -3705,11 +3705,11 @@ syms_of_keymap (void)
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);
diff --git a/src/lisp.h b/src/lisp.h
index ba27d86fc8..b4499b0eaa 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2626,7 +2626,15 @@ extern Lisp_Object make_string_from_bytes (const char *, ptrdiff_t, ptrdiff_t);
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. */
diff --git a/src/lread.c b/src/lread.c
index 900a25372d..bd85e44093 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3700,7 +3700,7 @@ intern_c_string (const char *str)
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 @@ init_obarray (void)
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 @@ otherwise to default specified by file `epaths.h' when Emacs was built. */);
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 @@ from the file, and matches them against this regular expression.
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);
diff --git a/src/search.c b/src/search.c
index 9004dc7827..de95f5a30f 100644
--- a/src/search.c
+++ b/src/search.c
@@ -3056,12 +3056,12 @@ syms_of_search (void)
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);
diff --git a/src/syntax.c b/src/syntax.c
index de1ab2a751..69c2789ed3 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3475,7 +3475,7 @@ syms_of_syntax (void)
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. */);
diff --git a/src/w32fns.c b/src/w32fns.c
index 53d344d11e..459d4c835f 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -6798,7 +6798,7 @@ syms_of_w32fns (void)
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;
diff --git a/src/xdisp.c b/src/xdisp.c
index 4b9445d746..1732e3dfe5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -28728,7 +28728,7 @@ syms_of_xdisp (void)
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 @@ See also `overlay-arrow-string'. */);
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 @@ and is used only on frames for which no explicit name has been set
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)));
diff --git a/src/xfaces.c b/src/xfaces.c
index a6b260a292..e9089017c4 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6643,7 +6643,7 @@ that number of fonts when searching for a matching font. */);
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.
diff --git a/src/xfns.c b/src/xfns.c
index 35f715d89f..ad3fff85f3 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -5828,7 +5828,7 @@ syms_of_xfns (void)
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.
diff --git a/src/xterm.c b/src/xterm.c
index b73290ccd0..3cf6b4c349 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10845,7 +10845,7 @@ syms_of_xterm (void)
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");