|
6 | 6 | #include "pycore_object.h" // _PyObject_GC_TRACK |
7 | 7 | #include "pycore_pystate.h" // _PyThreadState_GET() |
8 | 8 | #include "pycore_tuple.h" // _PyTuple_ITEMS() |
9 | | -#include "structmember.h" // PyMemberDef |
| 9 | + |
10 | 10 |
|
11 | 11 | #include "clinic/_functoolsmodule.c.h" |
12 | 12 | /*[clinic input] |
@@ -340,18 +340,18 @@ PyDoc_STRVAR(partial_doc, |
340 | 340 |
|
341 | 341 | #define OFF(x) offsetof(partialobject, x) |
342 | 342 | static PyMemberDef partial_memberlist[] = { |
343 | | - {"func", T_OBJECT, OFF(fn), READONLY, |
| 343 | + {"func", _Py_T_OBJECT, OFF(fn), Py_READONLY, |
344 | 344 | "function object to use in future partial calls"}, |
345 | | - {"args", T_OBJECT, OFF(args), READONLY, |
| 345 | + {"args", _Py_T_OBJECT, OFF(args), Py_READONLY, |
346 | 346 | "tuple of arguments to future partial calls"}, |
347 | | - {"keywords", T_OBJECT, OFF(kw), READONLY, |
| 347 | + {"keywords", _Py_T_OBJECT, OFF(kw), Py_READONLY, |
348 | 348 | "dictionary of keyword arguments to future partial calls"}, |
349 | | - {"__weaklistoffset__", T_PYSSIZET, |
350 | | - offsetof(partialobject, weakreflist), READONLY}, |
351 | | - {"__dictoffset__", T_PYSSIZET, |
352 | | - offsetof(partialobject, dict), READONLY}, |
353 | | - {"__vectorcalloffset__", T_PYSSIZET, |
354 | | - offsetof(partialobject, vectorcall), READONLY}, |
| 349 | + {"__weaklistoffset__", Py_T_PYSSIZET, |
| 350 | + offsetof(partialobject, weakreflist), Py_READONLY}, |
| 351 | + {"__dictoffset__", Py_T_PYSSIZET, |
| 352 | + offsetof(partialobject, dict), Py_READONLY}, |
| 353 | + {"__vectorcalloffset__", Py_T_PYSSIZET, |
| 354 | + offsetof(partialobject, vectorcall), Py_READONLY}, |
355 | 355 | {NULL} /* Sentinel */ |
356 | 356 | }; |
357 | 357 |
|
@@ -540,7 +540,7 @@ keyobject_traverse(keyobject *ko, visitproc visit, void *arg) |
540 | 540 | } |
541 | 541 |
|
542 | 542 | static PyMemberDef keyobject_members[] = { |
543 | | - {"obj", T_OBJECT, |
| 543 | + {"obj", _Py_T_OBJECT, |
544 | 544 | offsetof(keyobject, object), 0, |
545 | 545 | PyDoc_STR("Value wrapped by a key function.")}, |
546 | 546 | {NULL} |
@@ -1394,10 +1394,10 @@ static PyGetSetDef lru_cache_getsetlist[] = { |
1394 | 1394 | }; |
1395 | 1395 |
|
1396 | 1396 | static PyMemberDef lru_cache_memberlist[] = { |
1397 | | - {"__dictoffset__", T_PYSSIZET, |
1398 | | - offsetof(lru_cache_object, dict), READONLY}, |
1399 | | - {"__weaklistoffset__", T_PYSSIZET, |
1400 | | - offsetof(lru_cache_object, weakreflist), READONLY}, |
| 1397 | + {"__dictoffset__", Py_T_PYSSIZET, |
| 1398 | + offsetof(lru_cache_object, dict), Py_READONLY}, |
| 1399 | + {"__weaklistoffset__", Py_T_PYSSIZET, |
| 1400 | + offsetof(lru_cache_object, weakreflist), Py_READONLY}, |
1401 | 1401 | {NULL} /* Sentinel */ |
1402 | 1402 | }; |
1403 | 1403 |
|
|
0 commit comments