diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-12-22 12:32:33 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-12-22 12:32:33 +0100 |
| commit | e2f130542be12a22c62744e718f0a5f884fc89d5 (patch) | |
| tree | 74ee4013dd811f10dcac4c9b81d6376c6a7c7871 /text.h | |
| parent | 53665d0e550330c331589df4d11de697e3a6ec91 (diff) | |
| download | vis-e2f130542be12a22c62744e718f0a5f884fc89d5.tar.gz vis-e2f130542be12a22c62744e718f0a5f884fc89d5.tar.xz | |
text: change datatype of Mark to uintptr_t
This should avoid undefined pointer comparisons.
Diffstat (limited to 'text.h')
| -rw-r--r-- | text.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2,6 +2,7 @@ #define TEXT_H #include <stdbool.h> +#include <stdint.h> #include <time.h> #include <unistd.h> #include <stdarg.h> @@ -99,7 +100,7 @@ bool text_iterator_codepoint_prev(Iterator *it, char *c); bool text_iterator_char_next(Iterator*, char *c); bool text_iterator_char_prev(Iterator*, char *c); -typedef const char* Mark; +typedef uintptr_t Mark; /* mark position `pos', the returned mark can be used to later retrieve * the same text segment */ Mark text_mark_set(Text*, size_t pos); |
