summaryrefslogtreecommitdiffhomepage
path: root/include/stc/ccommon.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-07-07 16:23:35 +0200
committerTyge Løvset <[email protected]>2023-07-07 16:23:35 +0200
commitd8c1a999cc566b8943003ad5281abc6eefcda519 (patch)
tree0d0c4c530276fcb0e89207eb630e6455b779d1ff /include/stc/ccommon.h
parente63a3dd6545261f5236a3d7e1c2be6571871b689 (diff)
downloadSTC-modified-d8c1a999cc566b8943003ad5281abc6eefcda519.tar.gz
STC-modified-d8c1a999cc566b8943003ad5281abc6eefcda519.zip
Issue #60: fixed compiler compability.
Diffstat (limited to 'include/stc/ccommon.h')
-rw-r--r--include/stc/ccommon.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/ccommon.h b/include/stc/ccommon.h
index bbf1579b..63ce5b09 100644
--- a/include/stc/ccommon.h
+++ b/include/stc/ccommon.h
@@ -69,8 +69,8 @@
#define c_LITERAL(T) T
#else
#define _i_alloc(T) ((T*)i_malloc(c_sizeof(T)))
- #define _i_new(T, ...) ((T*)memcpy(_i_alloc(T), (T[]){__VA_ARGS__}, sizeof(T)))
- #define c_new(T, ...) ((T*)memcpy(malloc(sizeof(T)), (T[]){__VA_ARGS__}, sizeof(T)))
+ #define _i_new(T, ...) ((T*)memcpy(_i_alloc(T), ((T[]){__VA_ARGS__}), sizeof(T)))
+ #define c_new(T, ...) ((T*)memcpy(malloc(sizeof(T)), ((T[]){__VA_ARGS__}), sizeof(T)))
#define c_LITERAL(T) (T)
#endif
#define c_malloc(sz) malloc(c_i2u(sz))