bits.h 755 B

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * @file
  3. * @brief Do not use, only contains deprecated defines.
  4. * @deprecated Use json_util.h instead.
  5. *
  6. * $Id: bits.h,v 1.10 2006/01/30 23:07:57 mclark Exp $
  7. *
  8. * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
  9. * Michael Clark <michael@metaparadigm.com>
  10. *
  11. * This library is free software; you can redistribute it and/or modify
  12. * it under the terms of the MIT license. See COPYING for details.
  13. *
  14. */
  15. #ifndef _bits_h_
  16. #define _bits_h_
  17. /**
  18. * @deprecated
  19. */
  20. #define hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)
  21. /**
  22. * @deprecated
  23. */
  24. #define error_ptr(error) ((void*)error)
  25. /**
  26. * @deprecated
  27. */
  28. #define error_description(error) (json_tokener_get_error(error))
  29. /**
  30. * @deprecated
  31. */
  32. #define is_error(ptr) (ptr == NULL)
  33. #endif