FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python/Include/boolobject.h at master · broncodans/python · GitHub
broncodans
/
python
Public
forked from
glix/python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python
/
Include
/
boolobject.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (25 loc) · 912 Bytes
Breadcrumbs
python
/
Include
/
boolobject.h
Copy path
File metadata and controls
36 lines (25 loc) · 912 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
35
36
/* Boolean object interface */
#ifndef
Py_BOOLOBJECT_H
#define
Py_BOOLOBJECT_H
#ifdef
__cplusplus
extern
"C"
{
#endif
typedef
PyIntObject
PyBoolObject
;
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
(
PyIntObject
)
_Py_ZeroStruct
,
_Py_TrueStruct
;
/* Use these macros */
#define
Py_False
((PyObject *) &_Py_ZeroStruct)
#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