summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2015-01-20 13:24:09 +0300
committerDmitry Antipov <dmantipov@yandex.ru>2015-01-20 13:24:09 +0300
commitf9775f21fcddd3d3715cb3249090d99322488a45 (patch)
treeb8efeeec110b5db69aefd44aee4cc94656e66b64 /src/xfns.c
parentd13fc2913d7c106f3c78e16fa2961678b8f9c472 (diff)
downloademacs-f9775f21fcddd3d3715cb3249090d99322488a45.tar.gz
Prefer xlispstrdup to avoid dumb calls to strlen
* nsfont.m (ns_get_family): * nsterm.m (ns_term_init): * w32fns.c (w32_window): * xfns.c (x_window, Fx_select_font): Use xlispstrdup.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 936c769a2de..a09e4a6df63 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2238,7 +2238,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
for the window manager, so GC relocation won't bother it.
Elsewhere we specify the window name for the window manager. */
- f->namebuf = xstrdup (SSDATA (Vx_resource_name));
+ f->namebuf = xlispstrdup (Vx_resource_name);
ac = 0;
XtSetArg (al[ac], XtNallowShellResize, 1); ac++;
@@ -5995,12 +5995,12 @@ nil, it defaults to the selected frame. */)
XSETFONT (font, FRAME_FONT (f));
font_param = Ffont_get (font, intern (":name"));
if (STRINGP (font_param))
- default_name = xstrdup (SSDATA (font_param));
+ default_name = xlispstrdup (font_param);
else
{
font_param = Fframe_parameter (frame, Qfont_param);
if (STRINGP (font_param))
- default_name = xstrdup (SSDATA (font_param));
+ default_name = xlispstrdup (font_param);
}
font = xg_get_font (f, default_name);