bpo-40724: Support setting buffer slots from type specs (GH-20648)

This is not part of the limited API but makes the buffer slots available for type specs.
This commit is contained in:
scoder 2020-06-06 21:35:10 +02:00 committed by GitHub
parent 68874a8502
commit f7c4e23642
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 60 additions and 2 deletions

View file

@ -1,7 +1,12 @@
/* Do not renumber the file; these numbers are part of the stable ABI. */
#if defined(Py_LIMITED_API)
/* Disabled, see #10181 */
#undef Py_bf_getbuffer
#undef Py_bf_releasebuffer
#else
#define Py_bf_getbuffer 1
#define Py_bf_releasebuffer 2
#endif
#define Py_mp_ass_subscript 3
#define Py_mp_length 4
#define Py_mp_subscript 5