mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
gh-103509: PEP 697 -- Limited C API for Extending Opaque Types (GH-103511)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
parent
35d273825a
commit
cd9a56c2b0
30 changed files with 970 additions and 19 deletions
|
|
@ -978,6 +978,12 @@ PyDescr_NewMember(PyTypeObject *type, PyMemberDef *member)
|
|||
{
|
||||
PyMemberDescrObject *descr;
|
||||
|
||||
if (member->flags & Py_RELATIVE_OFFSET) {
|
||||
PyErr_SetString(
|
||||
PyExc_SystemError,
|
||||
"PyDescr_NewMember used with Py_RELATIVE_OFFSET");
|
||||
return NULL;
|
||||
}
|
||||
descr = (PyMemberDescrObject *)descr_new(&PyMemberDescr_Type,
|
||||
type, member->name);
|
||||
if (descr != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue