8000 bpo-41073: PyType_GetSlot() can now accept static types. by shihai1991 · Pull Request #21931 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-41073: PyType_GetSlot() can now accept static types. #21931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Nov 10, 2020
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2df9180
Align method definitions in _testcapi
encukou Nov 3, 2020
2b077e3
Rewrite the slot-setting code a bit
encukou Nov 3, 2020
943174b
Remove the loop in PyType_GetSlot; we already know the position
encukou Nov 3, 2020
2d8b57f
typeslots.py: Add back code writing null entries
encukou Nov 3, 2020
2d72953
Merge remote-tracking branch 'origin/master' into bpo_41073_add_types…
shihai1991 Nov 7, 2020
6a688d9
Remove redundant test function
encukou Nov 10, 2020
fc2c06b
Merge master branch; regenerate typeslots.inc
encukou Nov 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update typeslots.h
  • Loading branch information
shihai1991 committed Aug 20, 2020
commit ec0348d768d070ac3e9ce2f768d6c602e80777e5
21 changes: 21 additions & 0 deletions Include/typeslots.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,26 @@
#define Py_tp_finalize 80
#endif
/* New in 3.10 */
#if defined(Py_LIMITED_API)
#undef Py_tp_as_async
#undef Py_tp_as_buffer
#undef Py_tp_as_mapping
#undef Py_tp_as_number
#undef Py_tp_as_sequence
#undef Py_tp_basicsize
#undef Py_tp_cache
#undef Py_tp_dict
#undef Py_tp_dictoffset
#undef Py_tp_flags
#undef Py_tp_itemsize
#undef Py_tp_mro
#undef Py_tp_name
#undef Py_tp_subclasses
#undef Py_tp_vectorcall_offset
#undef Py_tp_version_tag
#undef Py_tp_weaklist
#undef Py_tp_weaklistoffset
#else
#define Py_tp_as_async 81
#define Py_tp_as_buffer 82
#define Py_tp_as_mapping 83
Expand All @@ -107,3 +127,4 @@
#define Py_tp_version_tag 96
#define Py_tp_weaklist 97
#define Py_tp_weaklistoffset 98
#endif
0