mirror of
https://github.com/json-c/json-c.git
synced 2026-03-30 02:19:06 +08:00
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:
25
bits.h
25
bits.h
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user