summaryrefslogtreecommitdiffhomepage
path: root/include/stc/forward.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-08-09 17:34:13 +0200
committerTyge Løvset <[email protected]>2022-08-09 17:34:13 +0200
commit90624d6d398ff1d0f79df3dd656c4ad0c9c498a9 (patch)
tree8e45f6d00189a261c6a54979010f634df2af0d49 /include/stc/forward.h
parent17f1d2ed83952df00525f4be1d30a6c12e04a0f6 (diff)
downloadSTC-modified-90624d6d398ff1d0f79df3dd656c4ad0c9c498a9.tar.gz
STC-modified-90624d6d398ff1d0f79df3dd656c4ad0c9c498a9.zip
Experiment with other type of iterator. Does not compile.
Diffstat (limited to 'include/stc/forward.h')
-rw-r--r--include/stc/forward.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/stc/forward.h b/include/stc/forward.h
index 04566b98..1a85f1ed 100644
--- a/include/stc/forward.h
+++ b/include/stc/forward.h
@@ -57,7 +57,7 @@ typedef struct { const char* str; size_t size; } csview;
typedef char csview_value;
typedef union {
const char *ref;
- csview chr;
+ struct { csview chr; const char *_end; } u8;
} csview_iter, cstr_iter;
#define c_true(...) __VA_ARGS__
@@ -73,12 +73,12 @@ typedef union {
#define _c_carr2_types(SELF, VAL) \
typedef VAL SELF##_value; \
- typedef struct { SELF##_value *ref; } SELF##_iter; \
+ typedef struct { SELF##_value *ref, *_end; } SELF##_iter; \
typedef struct { SELF##_value **data; size_t xdim, ydim; } SELF
#define _c_carr3_types(SELF, VAL) \
typedef VAL SELF##_value; \
- typedef struct { SELF##_value *ref; } SELF##_iter; \
+ typedef struct { SELF##_value *ref, *_end; } SELF##_iter; \
typedef struct { SELF##_value ***data; size_t xdim, ydim, zdim; } SELF
#define _c_cbox_types(SELF, VAL) \
@@ -89,7 +89,7 @@ typedef union {
#define _c_cdeq_types(SELF, VAL) \
typedef VAL SELF##_value; \
- typedef struct {SELF##_value *ref; } SELF##_iter; \
+ typedef struct {SELF##_value *ref, *_end; } SELF##_iter; \
typedef struct {SELF##_value *_base, *data;} SELF
#define _c_clist_types(SELF, VAL) \
@@ -120,7 +120,7 @@ typedef union {
} SELF##_result; \
\
typedef struct { \
- SELF##_value *ref; \
+ SELF##_value *ref, *_end; \
uint8_t* _hx; \
} SELF##_iter; \
\
@@ -186,7 +186,7 @@ typedef union {
#endif
#define _c_cstack_types(SELF, VAL) \
typedef VAL SELF##_value; \
- typedef struct { SELF##_value *ref; } SELF##_iter; \
+ typedef struct { SELF##_value *ref, *_end; } SELF##_iter; \
typedef struct SELF { \
SELF##_value* data; \
size_t size, capacity; \
@@ -209,7 +209,7 @@ typedef union {
#define _c_cvec_types(SELF, VAL) \
typedef VAL SELF##_value; \
- typedef struct { SELF##_value *ref; } SELF##_iter; \
+ typedef struct { SELF##_value *ref, *_end; } SELF##_iter; \
typedef struct { SELF##_value *data; } SELF
#endif // STC_FORWARD_H_INCLUDED