summaryrefslogtreecommitdiffhomepage
path: root/include/stc/ccommon.h
diff options
context:
space:
mode:
authortylov <[email protected]>2023-07-21 10:49:45 +0200
committertylov <[email protected]>2023-07-21 10:49:45 +0200
commitdbcc13635402bd466675f4f41e865d02abc6f918 (patch)
tree269bbb8e641aaad34b0cca0bbd23c854faa3a960 /include/stc/ccommon.h
parent2d67f4040f6eecd41f1b864b43c62823ed75aff0 (diff)
downloadSTC-modified-dbcc13635402bd466675f4f41e865d02abc6f918.tar.gz
STC-modified-dbcc13635402bd466675f4f41e865d02abc6f918.zip
NB! Changed some coroutine API for consistency/simplicity: Added full task support.
Diffstat (limited to 'include/stc/ccommon.h')
-rw-r--r--include/stc/ccommon.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/stc/ccommon.h b/include/stc/ccommon.h
index 1f9ea80d..316a8ee7 100644
--- a/include/stc/ccommon.h
+++ b/include/stc/ccommon.h
@@ -69,7 +69,7 @@ typedef long long _llong;
#define c_new(T, ...) ((T*)memcpy(malloc(sizeof(T)), ((T[]){__VA_ARGS__}), sizeof(T)))
#define c_LITERAL(T) (T)
#endif
-#define c_new_n(T, n) ((T*)malloc(sizeof(T)*(n)))
+#define c_new_n(T, n) ((T*)malloc(sizeof(T)*(size_t)(n)))
#define c_malloc(sz) malloc(c_i2u(sz))
#define c_calloc(n, sz) calloc(c_i2u(n), c_i2u(sz))
#define c_realloc(p, sz) realloc(p, c_i2u(sz))