Debian Codegraph @

pypy/module/cpyext/include/boolobject.h

raw symbols SCIP
1 /* Boolean object interface */
2
3 #ifndef Py_BOOLOBJECT_H
4 #define Py_BOOLOBJECT_H
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 #define PyBool_Check(x) (Py_TYPE(x) == &PyBool_Type)
10
11 /* Py_False and Py_True are the only two bools in existence.
12 Don't forget to apply Py_INCREF() when returning either!!! */
13
14 /* Use these macros */
15 #define Py_False ((PyObject *) &_Py_FalseStruct)
16 #define Py_True ((PyObject *) &_Py_TrueStruct)
17
18 /* Macros for returning Py_True or Py_False, respectively */
19 #define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True
20 #define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False
21
22 #ifdef __cplusplus
23 }
24 #endif
25 #endif /* !Py_BOOLOBJECT_H */