aboutsummaryrefslogtreecommitdiffstats
path: root/src/fns.c
diff options
context:
space:
mode:
authorDmitry Antipov2012-07-20 11:29:04 +0400
committerDmitry Antipov2012-07-20 11:29:04 +0400
commitd7ea76b4f34c4e2c43bf0b1deeedde354ca540f7 (patch)
treeac3cb2ab6d00e89542afc9a5290191e549ce1d81 /src/fns.c
parent765e61e391ee0937ff6b30510b6c4651064fe38e (diff)
downloademacs-d7ea76b4f34c4e2c43bf0b1deeedde354ca540f7.tar.gz
emacs-d7ea76b4f34c4e2c43bf0b1deeedde354ca540f7.zip
Simple wrapper for make_unibyte_string, adjust font_open_by_name.
* src/lisp.h (build_unibyte_string): New function. * src/dosfns.c, src/fileio.c, src/fns.c, src/ftfont.c, src/process.c: * src/sysdep.c, src/w32fns.c, src/xfns.c: Use it. * src/font.c (font_open_by_name): Change 2nd and 3rd args to the only arg of type Lisp_Object to avoid redundant calls to make_unibyte_string. Adjust users accordingly. * src/font.h (font_open_by_name): Adjust prototype. * admin/coccinelle/unibyte_string.cocci: Semantic patch to convert from make_unibyte_string to build_unibyte_string where appropriate.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fns.c b/src/fns.c
index da8889e70a7..6e6b9332942 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2818,7 +2818,7 @@ The data read from the system are decoded using `locale-coding-system'. */)
2818 for (i = 0; i < 7; i++) 2818 for (i = 0; i < 7; i++)
2819 { 2819 {
2820 str = nl_langinfo (days[i]); 2820 str = nl_langinfo (days[i]);
2821 val = make_unibyte_string (str, strlen (str)); 2821 val = build_unibyte_string (str);
2822 /* Fixme: Is this coding system necessarily right, even if 2822 /* Fixme: Is this coding system necessarily right, even if
2823 it is consistent with CODESET? If not, what to do? */ 2823 it is consistent with CODESET? If not, what to do? */
2824 Faset (v, make_number (i), 2824 Faset (v, make_number (i),
@@ -2842,7 +2842,7 @@ The data read from the system are decoded using `locale-coding-system'. */)
2842 for (i = 0; i < 12; i++) 2842 for (i = 0; i < 12; i++)
2843 { 2843 {
2844 str = nl_langinfo (months[i]); 2844 str = nl_langinfo (months[i]);
2845 val = make_unibyte_string (str, strlen (str)); 2845 val = build_unibyte_string (str);
2846 Faset (v, make_number (i), 2846 Faset (v, make_number (i),
2847 code_convert_string_norecord (val, Vlocale_coding_system, 0)); 2847 code_convert_string_norecord (val, Vlocale_coding_system, 0));
2848 } 2848 }