]> git.eshelyaron.com Git - emacs.git/commit
Simplify and speed up string-to-multibyte
authorMattias Engdegård <mattiase@acm.org>
Mon, 11 Jul 2022 08:34:40 +0000 (10:34 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 11 Jul 2022 08:38:49 +0000 (10:38 +0200)
commit69b68099ecfb053ac77e0a954ab7467c440321ff
tree57f810ec7d6addf847ca4b1c70ff5d0cf5d02e21
parent96846877930f580e122e9af85b4653918c542f89
Simplify and speed up string-to-multibyte

* src/character.h (str_to_multibyte):
* src/character.c (str_to_multibyte): Change signature and simplify;
the conversion is no longer done in-place.
* src/fns.c (string_to_multibyte): Drop temporary buffer and memcpy;
adapt to new str_to_multibyte signature.
* src/print.c (print_string): Drop memcpy; adapt call to str_to_multibyte.
* test/src/fns-tests.el (fns--string-to-unibyte): Rename to...
(fns--string-to-unibyte-multibyte): ... this and strengthen, so that
the test covers string-to-multibyte reasonably well.
src/character.c
src/character.h
src/fns.c
src/print.c
test/src/fns-tests.el