diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-10-13 06:51:06 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-10-13 06:51:06 +0200 |
commit | 12175a339e2a2214fdd0ab4e16d8d8b1e92a78d3 (patch) | |
tree | c68e82a585d8a760b569b536d8951e18166a9d9d /src/module-env-25.h | |
parent | 45cb0403deeba1cc121147b1884e7fea6cd15338 (diff) | |
download | emacs-12175a339e2a2214fdd0ab4e16d8d8b1e92a78d3.tar.gz |
Allow creating unibyte strings from Emacs modules
* doc/lispref/internals.texi (Module Values): Document
make_unibyte_string (bug#34873).
* src/emacs-module.c (module_make_unibyte_string): New function.
(initialize_environment): Export it.
* src/module-env-25.h: Define it.
* test/data/emacs-module/mod-test.c (Fmod_test_return_unibyte):
Test it.
* test/src/emacs-module-tests.el (module/unibyte): Test it.
Diffstat (limited to 'src/module-env-25.h')
-rw-r--r-- | src/module-env-25.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/module-env-25.h b/src/module-env-25.h index 97c7787da34..01c06d5400d 100644 --- a/src/module-env-25.h +++ b/src/module-env-25.h @@ -102,6 +102,11 @@ const char *str, ptrdiff_t len) EMACS_ATTRIBUTE_NONNULL(1, 2); + /* Create a unibyte Lisp string from a string. */ + emacs_value (*make_unibyte_string) (emacs_env *env, + const char *str, ptrdiff_t len) + EMACS_ATTRIBUTE_NONNULL(1, 2); + /* Embedded pointer type. */ emacs_value (*make_user_ptr) (emacs_env *env, void (*fin) (void *) EMACS_NOEXCEPT, |