aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2015-11-23 19:00:03 -0800
committerPaul Eggert2015-11-23 19:01:51 -0800
commit004f4fc9d48f141f920e9ae9399f2b0e585edf9c (patch)
tree25684579f63f99df630fdc2e01e2a423ae486cd3 /src
parentda8c7ca2647d2e111a415f59c6b59053a19bdb61 (diff)
downloademacs-004f4fc9d48f141f920e9ae9399f2b0e585edf9c.tar.gz
emacs-004f4fc9d48f141f920e9ae9399f2b0e585edf9c.zip
Simplify module_make_function
* src/emacs-module.c (module_make_function): Simplify by calling build_unibyte_string.
Diffstat (limited to 'src')
-rw-r--r--src/emacs-module.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c
index 209f99baf0f..11aefc31359 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -387,16 +387,11 @@ module_make_function (emacs_env *env, ptrdiff_t min_arity, ptrdiff_t max_arity,
387 envptr->data = data; 387 envptr->data = data;
388 388
389 Lisp_Object envobj = make_save_ptr (envptr); 389 Lisp_Object envobj = make_save_ptr (envptr);
390 Lisp_Object doc; 390 Lisp_Object doc
391 if (documentation == NULL) 391 = (documentation
392 doc = Qnil; 392 ? code_convert_string_norecord (build_unibyte_string (documentation),
393 else 393 Qutf_8, false)
394 { 394 : Qnil);
395 ptrdiff_t nbytes = strlen (documentation);
396 doc = make_unibyte_string (documentation, nbytes);
397 doc = code_convert_string_norecord (doc, Qutf_8, false);
398 }
399
400 Lisp_Object ret = list4 (Qlambda, 395 Lisp_Object ret = list4 (Qlambda,
401 list2 (Qand_rest, Qargs), 396 list2 (Qand_rest, Qargs),
402 doc, 397 doc,