2 * $Id: bits.h,v 1.10 2006/01/30 23:07:57 mclark Exp $
4 * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
5 * Michael Clark <michael@metaparadigm.com>
7 * This library is free software; you can redistribute it and/or modify
8 * it under the terms of the MIT license. See COPYING for details.
16 #define json_min(a,b) ((a) < (b) ? (a) : (b))
20 #define json_max(a,b) ((a) > (b) ? (a) : (b))
23 #define hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)
24 #define error_ptr(error) ((void*)error)
25 #define error_description(error) (json_tokener_errors[error])
26 #define is_error(ptr) (ptr == NULL)