summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTom Harley2023-02-01 19:54:07 +0000
committerTom Harley2023-02-01 20:56:29 +0000
commit16cbf930223b0ea8501be5ec6bfbb22ab08ead77 (patch)
tree8d230d2ffb9faecee8a14a718e2fc45a3ed7cb49 /examples
parentAdd warn macro (diff)
downloadsinter-16cbf930223b0ea8501be5ec6bfbb22ab08ead77.tar.gz
sinter-16cbf930223b0ea8501be5ec6bfbb22ab08ead77.zip

Adjust int type in run_func.c

The arity of the function should be cast to an integer type that’s the same size as a pointer.

Diffstat (limited to 'examples')
-rw-r--r--examples/nq/run_func.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/nq/run_func.c b/examples/nq/run_func.c
index efb3bde..8d31e1f 100644
--- a/examples/nq/run_func.c
+++ b/examples/nq/run_func.c
@@ -1,3 +1,4 @@
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
@@ -32,7 +33,7 @@ typedef struct list {
if (arity == n) cast_apply_f(n)
void *run_func(void *f, void *v, void *as) {
- int arity = (int) v;
+ int arity = (uintptr_t) v;
list *l = (list *) as;
void repeat_n_32(*arg_);