diff options
Diffstat (limited to '')
-rw-r--r-- | types.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -38,4 +38,7 @@ struct string { #define STRING(x) (struct string){x, sizeof(x)-1} #define NULSTR(x) (struct string){x, strlen(x)} + +#define STRING_EQ(x, y) (x.len == y.len && memcmp(x.data, y.data, x.len) == 0) + #define WRITES(x, y) write(x, y.data, y.len) |