aboutsummaryrefslogtreecommitdiff
path: root/text.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-12-22 12:32:33 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-12-22 12:32:33 +0100
commite2f130542be12a22c62744e718f0a5f884fc89d5 (patch)
tree74ee4013dd811f10dcac4c9b81d6376c6a7c7871 /text.h
parent53665d0e550330c331589df4d11de697e3a6ec91 (diff)
downloadvis-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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/text.h b/text.h
index 0306a4c..3a5baa8 100644
--- a/text.h
+++ b/text.h
@@ -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);