| 1 |
|
| 2 |
|
| 3 |
#ifndef Py_BOOLOBJECT_H |
| 4 |
#define Py_BOOLOBJECT_H |
| 5 |
#ifdef __cplusplus |
| 6 |
extern "C" { |
| 7 |
#endif |
| 8 |
|
| 9 |
|
| 10 |
typedef PyIntObject PyBoolObject; |
| 11 |
|
| 12 |
PyAPI_DATA(PyTypeObject) PyBool_Type; |
| 13 |
|
| 14 |
#define PyBool_Check(x) (Py_TYPE(x) == &PyBool_Type) |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
PyAPI_DATA(PyIntObject) _Py_ZeroStruct, _Py_TrueStruct; |
| 21 |
|
| 22 |
|
| 23 |
#define Py_False ((PyObject *) &_Py_ZeroStruct) |
| 24 |
#define Py_True ((PyObject *) &_Py_TrueStruct) |
| 25 |
|
| 26 |
|
| 27 |
#define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True |
| 28 |
#define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False |
| 29 |
|
| 30 |
|
| 31 |
PyAPI_FUNC(PyObject *) PyBool_FromLong(long); |
| 32 |
|
| 33 |
#ifdef __cplusplus |
| 34 |
} |
| 35 |
#endif |
| 36 |
#endif |