Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
cpython/Include/descrobject.h at main · wrongnull/cpython · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
wrongnull
/
cpython
Public
forked from
python/cpython
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Files
Expand file tree
main
Breadcrumbs
cpython
/
Include
/
descrobject.h
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
100 lines (83 loc) · 3.01 KB
main
Breadcrumbs
cpython
/
Include
/
descrobject.h
Copy path
Top
File metadata and controls
Code
Blame
100 lines (83 loc) · 3.01 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/* Descriptors */
#ifndef
Py_DESCROBJECT_H
#define
Py_DESCROBJECT_H
#ifdef
__cplusplus
extern
"C"
{
#endif
typedef
PyObject
*
(
*
getter
)(
PyObject
*
,
void
*
);
typedef
int
(
*
setter
)(
PyObject
*
,
PyObject
*
,
void
*
);
struct
PyGetSetDef
{
const
char
*
name
;
getter
get
;
setter
set
;
const
char
*
doc
;
void
*
closure
;
};
PyAPI_DATA
(
PyTypeObject
)
PyClassMethodDescr_Type
;
PyAPI_DATA
(
PyTypeObject
)
PyGetSetDescr_Type
;
PyAPI_DATA
(
PyTypeObject
)
PyMemberDescr_Type
;
PyAPI_DATA
(
PyTypeObject
)
PyMethodDescr_Type
;
PyAPI_DATA
(
PyTypeObject
)
PyWrapperDescr_Type
;
PyAPI_DATA
(
PyTypeObject
)
PyDictProxy_Type
;
PyAPI_DATA
(
PyTypeObject
)
PyProperty_Type
;
PyAPI_FUNC
(
PyObject
*
)
PyDescr_NewMethod
(
PyTypeObject
*
,
PyMethodDef
*
);
PyAPI_FUNC
(
PyObject
*
)
PyDescr_NewClassMethod
(
PyTypeObject
*
,
PyMethodDef
*
);
PyAPI_FUNC
(
PyObject
*
)
PyDescr_NewMember
(
PyTypeObject
*
,
PyMemberDef
*
);
PyAPI_FUNC
(
PyObject
*
)
PyDescr_NewGetSet
(
PyTypeObject
*
,
PyGetSetDef
*
);
PyAPI_FUNC
(
PyObject
*
)
PyDictProxy_New
(
PyObject
*
);
PyAPI_FUNC
(
PyObject
*
)
PyWrapper_New
(
PyObject
*
,
PyObject
*
);
/* An array of PyMemberDef structures defines the name, type and offset
of selected members of a C structure. These can be read by
PyMember_GetOne() and set by PyMember_SetOne() (except if their READONLY
flag is set). The array must be terminated with an entry whose name
pointer is NULL. */
struct
PyMemberDef
{
const
char
*
name
;
int
type
;
Py_ssize_t
offset
;
int
flags
;
const
char
*
doc
;
};
// These constants used to be in structmember.h, not prefixed by Py_.
// (structmember.h now has aliases to the new names.)
/* Types */
#define
Py_T_SHORT
0
#define
Py_T_INT
1
#define
Py_T_LONG
2
#define
Py_T_FLOAT
3
#define
Py_T_DOUBLE
4
#define
Py_T_STRING
5
#define
_Py_T_OBJECT
6 // Deprecated, use Py_T_OBJECT_EX instead
/* the ordering here is weird for binary compatibility */
#define
Py_T_CHAR
7
/* 1-character string */
#define
Py_T_BYTE
8
/* 8-bit signed int */
/* unsigned variants: */
#define
Py_T_UBYTE
9
#define
Py_T_USHORT
10
#define
Py_T_UINT
11
#define
Py_T_ULONG
12
/* Added by Jack: strings contained in the structure */
#define
Py_T_STRING_INPLACE
13
/* Added by Lillo: bools contained in the structure (assumed char) */
#define
Py_T_BOOL
14
#define
Py_T_OBJECT_EX
16
#define
Py_T_LONGLONG
17
#define
Py_T_ULONGLONG
18
#define
Py_T_PYSSIZET
19
/* Py_ssize_t */
#define
_Py_T_NONE
20 // Deprecated. Value is always None.
/* Flags */
#define
Py_READONLY
1
#define
Py_AUDIT_READ
2 // Added in 3.10, harmless no-op before that
#define
_Py_WRITE_RESTRICTED
4 // Deprecated, no-op. Do not reuse the value.
#define
Py_RELATIVE_OFFSET
8
PyAPI_FUNC
(
PyObject
*
)
PyMember_GetOne
(
const
char
*
,
PyMemberDef
*
);
PyAPI_FUNC
(
int
)
PyMember_SetOne
(
char
*
,
PyMemberDef
*
,
PyObject
*
);
#ifndef
Py_LIMITED_API
# define
Py_CPYTHON_DESCROBJECT_H
# include
"cpython/descrobject.h"
# undef
Py_CPYTHON_DESCROBJECT_H
#endif
#ifdef
__cplusplus
}
#endif
#endif
/* !Py_DESCROBJECT_H */
You can’t perform that action at this time.