mirror of
https://github.com/python/cpython.git
synced 2024-12-18 06:14:00 +08:00
Allow docstrings to be removed during compilation for *SLOT macro and friends
This commit is contained in:
parent
8b056da6c8
commit
d47714a727
@ -3850,12 +3850,14 @@ typedef struct wrapperbase slotdef;
|
|||||||
#undef RBINSLOT
|
#undef RBINSLOT
|
||||||
|
|
||||||
#define TPSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
|
#define TPSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
|
||||||
{NAME, offsetof(PyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, DOC}
|
{NAME, offsetof(PyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
|
||||||
|
PyDoc_STR(DOC)}
|
||||||
#define FLSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC, FLAGS) \
|
#define FLSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC, FLAGS) \
|
||||||
{NAME, offsetof(PyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
|
{NAME, offsetof(PyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
|
||||||
DOC, FLAGS}
|
PyDoc_STR(DOC), FLAGS}
|
||||||
#define ETSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
|
#define ETSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
|
||||||
{NAME, offsetof(etype, SLOT), (void *)(FUNCTION), WRAPPER, DOC}
|
{NAME, offsetof(etype, SLOT), (void *)(FUNCTION), WRAPPER, \
|
||||||
|
PyDoc_STR(DOC)}
|
||||||
#define SQSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
|
#define SQSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
|
||||||
ETSLOT(NAME, as_sequence.SLOT, FUNCTION, WRAPPER, DOC)
|
ETSLOT(NAME, as_sequence.SLOT, FUNCTION, WRAPPER, DOC)
|
||||||
#define MPSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
|
#define MPSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
|
||||||
|
Loading…
Reference in New Issue
Block a user