Move the json_min() and json_max() macros to json_util.h and mark everything else in bits.h deprecated.

Eliminate all uses of bits.h within the json-c code.
This commit is contained in:
Eric Haszlakiewicz
2014-05-03 22:29:10 -04:00
parent 1da0599e0e
commit d4e81f9ec8
7 changed files with 34 additions and 17 deletions

25
bits.h
View File

@@ -1,4 +1,7 @@
/*
/**
* @file
* @deprecated Use json_util.h instead.
*
* $Id: bits.h,v 1.10 2006/01/30 23:07:57 mclark Exp $
*
* Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
@@ -12,17 +15,21 @@
#ifndef _bits_h_
#define _bits_h_
#ifndef json_min
#define json_min(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef json_max
#define json_max(a,b) ((a) > (b) ? (a) : (b))
#endif
/**
* @deprecated
*/
#define hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)
/**
* @deprecated
*/
#define error_ptr(error) ((void*)error)
/**
* @deprecated
*/
#define error_description(error) (json_tokener_get_error(error))
/**
* @deprecated
*/
#define is_error(ptr) (ptr == NULL)
#endif