summaryrefslogtreecommitdiff
path: root/source/kit/move_back.h
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2023-09-12 03:18:06 +0200
committerMitya Selivanov <automainint@guattari.tech>2023-09-12 03:18:06 +0200
commitf0f23e874dd19a4fa3e41c8b489aa1f3fbd792c0 (patch)
treefdbd7af3fb7fe28959e5b983d10da3ca66078567 /source/kit/move_back.h
parentd16209180486738187487737832ba5675d5935ce (diff)
downloadkit-f0f23e874dd19a4fa3e41c8b489aa1f3fbd792c0.zip
Refactor; CAS atomics
Diffstat (limited to 'source/kit/move_back.h')
-rw-r--r--source/kit/move_back.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/kit/move_back.h b/source/kit/move_back.h
index 0927321..7313a1e 100644
--- a/source/kit/move_back.h
+++ b/source/kit/move_back.h
@@ -1,9 +1,7 @@
#ifndef KIT_MOVE_BACK_H
#define KIT_MOVE_BACK_H
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-#endif
+#include "types.h"
#include <string.h>
@@ -13,9 +11,9 @@ extern "C" {
#define KIT_MOVE_BACK_INL(new_size, array, ...) \
do { \
- ptrdiff_t index_; \
- ptrdiff_t end_ = (array).size; \
- unsigned char temp_[sizeof *(array).values]; \
+ i64 index_; \
+ i64 end_ = (array).size; \
+ u8 temp_[sizeof *(array).values]; \
for (index_ = 0; index_ < end_;) { \
if (__VA_ARGS__) { \
end_--; \