FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpython/Include/boolobject.h at 3.8 · python/cpython · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
python
/
cpython
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
35.3k
Star
74.9k
Code
Issues
5k+
Pull requests
2.5k
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cpython
/
Include
/
boolobject.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (24 loc) · 886 Bytes
Breadcrumbs
cpython
/
Include
/
boolobject.h
Copy path
File metadata and controls
34 lines (24 loc) · 886 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* Boolean object interface */
#ifndef
Py_BOOLOBJECT_H
#define
Py_BOOLOBJECT_H
#ifdef
__cplusplus
extern
"C"
{
#endif
PyAPI_DATA
(
PyTypeObject
)
PyBool_Type
;
#define
PyBool_Check
(
x
) (Py_TYPE(x) == &PyBool_Type)
/* Py_False and Py_True are the only two bools in existence.
Don't forget to apply Py_INCREF() when returning either!!! */
/* Don't use these directly */
PyAPI_DATA
(
struct
_longobject
)
_Py_FalseStruct
,
_Py_TrueStruct
;
/* Use these macros */
#define
Py_False
((PyObject *) &_Py_FalseStruct)
#define
Py_True
((PyObject *) &_Py_TrueStruct)
/* Macros for returning Py_True or Py_False, respectively */
#define
Py_RETURN_TRUE
return Py_INCREF(Py_True), Py_True
#define
Py_RETURN_FALSE
return Py_INCREF(Py_False), Py_False
/* Function to return a bool from a C long */
PyAPI_FUNC
(
PyObject
*
)
PyBool_FromLong
(
long
);
#ifdef
__cplusplus
}
#endif
#endif
/* !Py_BOOLOBJECT_H */
Back
|
FazBrowse Home
|
New Git URL