* src/fns.c (syms_of_fns):
* src/image.c (slurp_image): Prefer build_unibyte_string (str) to
make_unibyte_string (str, strlen (str)).
* admin/coccinelle/unibyte_string.cocci: Support string literals.
@@
- make_unibyte_string (I, strlen (I))
+ build_unibyte_string (I)
+
+@@
+constant C;
+@@
+- make_unibyte_string (C, strlen (C))
++ build_unibyte_string (C)
DEFVAR_LISP ("yes-or-no-prompt", Vyes_or_no_prompt,
doc: /* String to append when `yes-or-no-p' asks a question.
For best results this should end in a space. */);
- Vyes_or_no_prompt = make_unibyte_string ("(yes or no) ", strlen ("(yes or no) "));
+ Vyes_or_no_prompt = build_unibyte_string ("(yes or no) ");
defsubr (&Sidentity);
defsubr (&Srandom);
char *result = slurp_file (fd, size);
if (result == NULL)
image_error ("Error loading %s image `%s'",
- make_unibyte_string (image_type, strlen (image_type)),
+ build_unibyte_string (image_type),
file);
return result;
}