From d26d50fc424a177e976d361622c632381d9194e9 Mon Sep 17 00:00:00 2001 From: Felix von Leitner Date: Thu, 9 Apr 2015 23:35:40 +0000 Subject: [PATCH] make critbit0_contains as pure --- critbit.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/critbit.h b/critbit.h index 11d096b..f9ceb3c 100644 --- a/critbit.h +++ b/critbit.h @@ -5,11 +5,18 @@ extern "C" { #endif +/* for __pure__ if we are compiling under dietlibc */ +#include + +#ifndef __pure__ +#define __pure__ +#endif + typedef struct { void *root; } critbit0_tree; -int critbit0_contains(critbit0_tree *t, const char *u); +int critbit0_contains(critbit0_tree *t, const char *u) __pure__; int critbit0_insert(critbit0_tree *t, const char *u); int critbit0_delete(critbit0_tree *t, const char *u); void critbit0_clear(critbit0_tree *t);