aboutsummaryrefslogtreecommitdiffstats
path: root/test/data
diff options
context:
space:
mode:
Diffstat (limited to 'test/data')
-rw-r--r--test/data/emacs-module/mod-test.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/data/emacs-module/mod-test.c b/test/data/emacs-module/mod-test.c
index da298d4e398..258a679b207 100644
--- a/test/data/emacs-module/mod-test.c
+++ b/test/data/emacs-module/mod-test.c
@@ -268,6 +268,16 @@ Fmod_test_string_a_to_b (emacs_env *env, ptrdiff_t nargs, emacs_value args[],
268} 268}
269 269
270 270
271/* Return a unibyte string. */
272static emacs_value
273Fmod_test_return_unibyte (emacs_env *env, ptrdiff_t nargs, emacs_value args[],
274 void *data)
275{
276 const char *string = "foo\x00zot";
277 return env->make_unibyte_string (env, string, 7);
278}
279
280
271/* Embedded pointers in lisp objects. */ 281/* Embedded pointers in lisp objects. */
272 282
273/* C struct (pointer to) that will be embedded. */ 283/* C struct (pointer to) that will be embedded. */
@@ -750,6 +760,7 @@ emacs_module_init (struct emacs_runtime *ert)
750 DEFUN ("mod-test-globref-reordered", Fmod_test_globref_reordered, 0, 0, NULL, 760 DEFUN ("mod-test-globref-reordered", Fmod_test_globref_reordered, 0, 0, NULL,
751 NULL); 761 NULL);
752 DEFUN ("mod-test-string-a-to-b", Fmod_test_string_a_to_b, 1, 1, NULL, NULL); 762 DEFUN ("mod-test-string-a-to-b", Fmod_test_string_a_to_b, 1, 1, NULL, NULL);
763 DEFUN ("mod-test-return-unibyte", Fmod_test_return_unibyte, 0, 0, NULL, NULL);
753 DEFUN ("mod-test-userptr-make", Fmod_test_userptr_make, 1, 1, NULL, NULL); 764 DEFUN ("mod-test-userptr-make", Fmod_test_userptr_make, 1, 1, NULL, NULL);
754 DEFUN ("mod-test-userptr-get", Fmod_test_userptr_get, 1, 1, NULL, NULL); 765 DEFUN ("mod-test-userptr-get", Fmod_test_userptr_get, 1, 1, NULL, NULL);
755 DEFUN ("mod-test-vector-fill", Fmod_test_vector_fill, 2, 2, NULL, NULL); 766 DEFUN ("mod-test-vector-fill", Fmod_test_vector_fill, 2, 2, NULL, NULL);