| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7247407 commit 4dedd0f
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -217,6 +217,7 @@ Build and C API Changes | |||
| 217 | 217 | ``PyThreadState.recursion_depth`` field. Remove ``_Py_CheckRecursionLimit`` | |
| 218 | 218 | from the stable ABI. | |
| 219 | 219 | (Contributed by Victor Stinner in :issue:`38644`.) | |
| 220 | + | ||
| 220 | 221 | * Add a new public :c:func:`PyObject_CallNoArgs` function to the C API, which | |
| 221 | 222 | calls a callable Python object without any arguments. It is the most efficient | |
| 222 | 223 | way to call a callable Python object without any argument. | |
@@ -230,6 +231,10 @@ Build and C API Changes | |||
| 230 | 231 | ``pyfpe.h`` from ``Py_LIMITED_API`` (stable API). | |
| 231 | 232 | (Contributed by Victor Stinner in :issue:`38835`.) | |
| 232 | 233 | ||
| 234 | + * Remove ``PyMethod_ClearFreeList()`` and ``PyCFunction_ClearFreeList()`` | ||
| 235 | + functions: the free lists of bound method objects have been removed. | ||
| 236 | + (Contributed by Inada Naoki and Victor Stinner in :issue:`37340`.) | ||
| 237 | + | ||
| 233 | 238 | ||
| 234 | 239 | Deprecated | |
| 235 | 240 | ========== | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,8 +33,6 @@ PyAPI_FUNC(PyObject *) PyMethod_Self(PyObject *); | |||
| 33 | 33 | #define PyMethod_GET_SELF(meth) \ | |
| 34 | 34 | (((PyMethodObject *)meth) -> im_self) | |
| 35 | 35 | ||
| 36 | - PyAPI_FUNC(int) PyMethod_ClearFreeList(void); | ||
| 37 | - | ||
| 38 | 36 | typedef struct { | |
| 39 | 37 | PyObject_HEAD | |
| 40 | 38 | PyObject *func; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,9 +59,7 @@ extern PyStatus _PyGC_Init(PyThreadState *tstate); | |||
| 59 | 59 | ||
| 60 | 60 | /* Various internal finalizers */ | |
| 61 | 61 | ||
| 62 | - extern void _PyMethod_Fini(void); | ||
| 63 | 62 | extern void _PyFrame_Fini(void); | |
| 64 | - extern void _PyCFunction_Fini(void); | ||
| 65 | 63 | extern void _PyDict_Fini(void); | |
| 66 | 64 | extern void _PyTuple_Fini(void); | |
| 67 | 65 | extern void _PyList_Fini(void); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -97,8 +97,6 @@ typedef struct { | |||
| 97 | 97 | } PyCFunctionObject; | |
| 98 | 98 | #endif | |
| 99 | 99 | ||
| 100 | - PyAPI_FUNC(int) PyCFunction_ClearFreeList(void); | ||
| 101 | - | ||
| 102 | 100 | #ifdef __cplusplus | |
| 103 | 101 | } | |
| 104 | 102 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,2 @@ | |||
| 1 | + Remove ``PyMethod_ClearFreeList()`` and ``PyCFunction_ClearFreeList()`` | ||
| 2 | + functions: the free lists of bound method objects have been removed. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1029,9 +1029,7 @@ delete_garbage(PyThreadState *tstate, GCState *gcstate, | |||
| 1029 | 1029 | static void | |
| 1030 | 1030 | clear_freelists(void) | |
| 1031 | 1031 | { | |
| 1032 | - (void)PyMethod_ClearFreeList(); | ||
| 1033 | 1032 | (void)PyFrame_ClearFreeList(); | |
| 1034 | - (void)PyCFunction_ClearFreeList(); | ||
| 1035 | 1033 | (void)PyTuple_ClearFreeList(); | |
| 1036 | 1034 | (void)PyUnicode_ClearFreeList(); | |
| 1037 | 1035 | (void)PyFloat_ClearFreeList(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -371,20 +371,6 @@ PyTypeObject PyMethod_Type = { | |||
| 371 | 371 | method_new, /* tp_new */ | |
| 372 | 372 | }; | |
| 373 | 373 | ||
| 374 | - /* Clear out the free list */ | ||
| 375 | - | ||
| 376 | - int | ||
| 377 | - PyMethod_ClearFreeList(void) | ||
| 378 | - { | ||
| 379 | - return 0; | ||
| 380 | - } | ||
| 381 | - | ||
| 382 | - void | ||
| 383 | - _PyMethod_Fini(void) | ||
| 384 | - { | ||
| 385 | - (void)PyMethod_ClearFreeList(); | ||
| 386 | - } | ||
| 387 | - | ||
| 388 | 374 | /* ------------------------------------------------------------------------ | |
| 389 | 375 | * instance method | |
| 390 | 376 | */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -313,21 +313,6 @@ PyTypeObject PyCFunction_Type = { | |||
| 313 | 313 | 0, /* tp_dict */ | |
| 314 | 314 | }; | |
| 315 | 315 | ||
| 316 | - /* Clear out the free list */ | ||
| 317 | - | ||
| 318 | - int | ||
| 319 | - PyCFunction_ClearFreeList(void) | ||
| 320 | - { | ||
| 321 | - return 0; | ||
| 322 | - } | ||
| 323 | - | ||
| 324 | - void | ||
| 325 | - _PyCFunction_Fini(void) | ||
| 326 | - { | ||
| 327 | - (void)PyCFunction_ClearFreeList(); | ||
| 328 | - } | ||
| 329 | - | ||
| 330 | - | ||
| 331 | 316 | /* Vectorcall functions for each of the PyCFunction calling conventions, | |
| 332 | 317 | * except for METH_VARARGS (possibly combined with METH_KEYWORDS) which | |
| 333 | 318 | * doesn't use vectorcall. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1173,9 +1173,7 @@ finalize_interp_types(PyThreadState *tstate, int is_main_interp) | |||
| 1173 | 1173 | { | |
| 1174 | 1174 | if (is_main_interp) { | |
| 1175 | 1175 | /* Sundry finalizers */ | |
| 1176 | - _PyMethod_Fini(); | ||
| 1177 | 1176 | _PyFrame_Fini(); | |
| 1178 | - _PyCFunction_Fini(); | ||
| 1179 | 1177 | _PyTuple_Fini(); | |
| 1180 | 1178 | _PyList_Fini(); | |
| 1181 | 1179 | _PySet_Fini(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments