summaryrefslogtreecommitdiff
path: root/test/src/emacs-module-resources/mod-test.c
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-08-19 16:48:59 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-08-19 16:48:59 -0700
commit07fcbb558d797272b9f43547da60beda485873a3 (patch)
tree77d5da14e9f9d9d8b1d877c70c01296fd3893796 /test/src/emacs-module-resources/mod-test.c
parentc9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff)
parentfb81c8c3adf8633f2f617c82f6019aef630860c7 (diff)
downloademacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'test/src/emacs-module-resources/mod-test.c')
-rw-r--r--test/src/emacs-module-resources/mod-test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/src/emacs-module-resources/mod-test.c b/test/src/emacs-module-resources/mod-test.c
index ad59cfc18cd..5720af8c605 100644
--- a/test/src/emacs-module-resources/mod-test.c
+++ b/test/src/emacs-module-resources/mod-test.c
@@ -288,6 +288,8 @@ struct super_struct
char large_unused_buffer[512];
};
+static void signal_errno (emacs_env *, char const *);
+
/* Return a new user-pointer to a super_struct, with amazing_int set
to the passed parameter. */
static emacs_value
@@ -295,6 +297,8 @@ Fmod_test_userptr_make (emacs_env *env, ptrdiff_t nargs, emacs_value args[],
void *data)
{
struct super_struct *p = calloc (1, sizeof *p);
+ if (!p)
+ signal_errno (env, "calloc");
p->amazing_int = env->extract_integer (env, args[0]);
return env->make_user_ptr (env, free, p);
}