boolobject.h 453 B

123456789101112131415161718192021
  1. /* Bool object interface */
  2. #ifndef Py_BOOLOBJECT_H
  3. #define Py_BOOLOBJECT_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #define Py_False ((PyObject *) &_Py_ZeroStruct)
  8. #define Py_True ((PyObject *) &_Py_TrueStruct)
  9. /* Macros for returning Py_True or Py_False, respectively */
  10. #define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True
  11. #define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False
  12. #ifdef __cplusplus
  13. }
  14. #endif
  15. #endif /* !Py_BOOLOBJECT_H */