From d7ea76b4f34c4e2c43bf0b1deeedde354ca540f7 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Fri, 20 Jul 2012 11:29:04 +0400 Subject: 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. --- admin/ChangeLog | 6 ++++++ admin/coccinelle/unibyte_string.cocci | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 admin/coccinelle/unibyte_string.cocci (limited to 'admin') diff --git a/admin/ChangeLog b/admin/ChangeLog index 0d059714788..b4c88c20ed1 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,8 @@ +2012-07-20 Dmitry Antipov + + * coccinelle/unibyte_string.cocci: Semantic patch to convert from + make_unibyte_string to build_unibyte_string where appropriate. + 2012-07-17 Eli Zaretskii * CPP-DEFINES: Remove FILE_SYSTEM_CASE. @@ -5,6 +10,7 @@ 2012-07-17 Chong Yidong * Version 24.1 released. + 2012-07-11 Paul Eggert Assume mkdir, perror, rename, rmdir, strerror. diff --git a/admin/coccinelle/unibyte_string.cocci b/admin/coccinelle/unibyte_string.cocci new file mode 100644 index 00000000000..0ff8cafa15d --- /dev/null +++ b/admin/coccinelle/unibyte_string.cocci @@ -0,0 +1,6 @@ +// make_unibyte_string (str, strlen (str)) -> build_unibyte_string (str) +@@ +identifier I; +@@ +- make_unibyte_string (I, strlen (I)) ++ build_unibyte_string (I) -- cgit v1.2.1