diff options
| author | Tom Harley | 2023-02-01 19:54:07 +0000 |
|---|---|---|
| committer | Tom Harley | 2023-02-01 20:56:29 +0000 |
| commit | 16cbf930223b0ea8501be5ec6bfbb22ab08ead77 (patch) | |
| tree | 8d230d2ffb9faecee8a14a718e2fc45a3ed7cb49 | |
| parent | Add warn macro (diff) | |
| download | sinter-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.
| -rw-r--r-- | examples/nq/run_func.c | 3 |
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_); |
