Commit 7c684d90 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

txt: New macros to work with strings

parent 8d0cb3f5
......@@ -263,6 +263,8 @@ typedef struct {
#define Tcheck(t) do { (void)pdiff((t).b, (t).e); } while (0)
#define Tlen(t) (pdiff((t).b, (t).e))
#define Tstr(s) ((txt){(s), (s) + strlen(s)})
#define Tstrcmp(t, s) (strncmp((t).b, (s), Tlen(t)))
/* #3020 dummy definitions until PR is merged*/
#define LIKELY(x) (x)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment