File tree Expand file tree Collapse file tree 3 files changed +0
-28
lines changed
Expand file tree Collapse file tree 3 files changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ _PyFunction_IsVersionValid(uint32_t version)
3030extern uint32_t _PyFunction_GetVersionForCurrentState (PyFunctionObject * func );
3131PyAPI_FUNC (void ) _PyFunction_SetVersion (PyFunctionObject * func , uint32_t version );
3232void _PyFunction_ClearCodeByVersion (uint32_t version );
33- PyFunctionObject * _PyFunction_LookupByVersion (uint32_t version , PyObject * * p_code );
3433
3534extern PyObject * _Py_set_function_type_params (
3635 PyThreadState * unused , PyObject * func , PyObject * type_params );
Original file line number Diff line number Diff line change @@ -373,32 +373,6 @@ _PyFunction_ClearCodeByVersion(uint32_t version)
373373#endif
374374}
375375
376- PyFunctionObject *
377- _PyFunction_LookupByVersion (uint32_t version , PyObject * * p_code )
378- {
379- #ifdef Py_GIL_DISABLED
380- return NULL ;
381- #else
382- PyInterpreterState * interp = _PyInterpreterState_GET ();
383- struct _func_version_cache_item * slot = get_cache_item (interp , version );
384- if (slot -> code ) {
385- assert (PyCode_Check (slot -> code ));
386- PyCodeObject * code = (PyCodeObject * )slot -> code ;
387- if (code -> co_version == version ) {
388- * p_code = slot -> code ;
389- }
390- }
391- else {
392- * p_code = NULL ;
393- }
394- if (slot -> func && slot -> func -> func_version == version ) {
395- assert (slot -> func -> func_code == slot -> code );
396- return slot -> func ;
397- }
398- return NULL ;
399- #endif
400- }
401-
402376uint32_t
403377_PyFunction_GetVersionForCurrentState (PyFunctionObject * func )
404378{
Original file line number Diff line number Diff line change 88#include "pycore_bitutils.h" // _Py_popcount32()
99#include "pycore_ceval.h" // _Py_set_eval_breaker_bit
1010#include "pycore_code.h" // _Py_GetBaseCodeUnit
11- #include "pycore_function.h" // _PyFunction_LookupByVersion()
1211#include "pycore_interpframe.h"
1312#include "pycore_object.h" // _PyObject_GC_UNTRACK()
1413#include "pycore_opcode_metadata.h" // _PyOpcode_OpName[]
You can’t perform that action at this time.
0 commit comments