summaryrefslogtreecommitdiff
path: root/src/xterm.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2012-07-10 12:43:46 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2012-07-10 12:43:46 +0400
commit2a0213a6d0a9e36a388994445837e051d0bbe5f9 (patch)
treeb7e4d5c2ef5d4061e083ef2123c1fc72ad46d93d /src/xterm.c
parentcb1caeaf2ba26df05e8f9bcd4aa63203cef781fb (diff)
downloademacs-2a0213a6d0a9e36a388994445837e051d0bbe5f9.tar.gz
emacs-2a0213a6d0a9e36a388994445837e051d0bbe5f9.tar.bz2
emacs-2a0213a6d0a9e36a388994445837e051d0bbe5f9.zip
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/xterm.c')
-rw-r--r--src/xterm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index b73290ccd00..3cf6b4c349a 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");