File tree Expand file tree Collapse file tree 1 file changed +2
-32
lines changed Expand file tree Collapse file tree 1 file changed +2
-32
lines changed Original file line number Diff line number Diff line change @@ -405,45 +405,15 @@ _CPyObject_HasAttrId(PyObject *v, _Py_Identifier *name) {
405405 PyObject_CallMethodObjArgs((self), (name), (arg), NULL)
406406#endif
407407
408- #if CPY_3_13_FEATURES
409-
410- // These are copied from genobject.c in Python 3.13
411-
412- /* Returns a borrowed reference */
413- static inline PyCodeObject *
414- _PyGen_GetCode (PyGenObject * gen ) {
415- _PyInterpreterFrame * frame = (_PyInterpreterFrame * )(gen -> gi_iframe );
416- return _PyFrame_GetCode (frame );
417- }
418-
419- static int
420- gen_is_coroutine (PyObject * o )
421- {
422- if (PyGen_CheckExact (o )) {
423- PyCodeObject * code = _PyGen_GetCode ((PyGenObject * )o );
424- if (code -> co_flags & CO_ITERABLE_COROUTINE ) {
425- return 1 ;
426- }
427- }
428- return 0 ;
429- }
430-
431- #elif CPY_3_12_FEATURES
408+ #if CPY_3_12_FEATURES
432409
433410// These are copied from genobject.c in Python 3.12
434411
435- /* Returns a borrowed reference */
436- static inline PyCodeObject *
437- _PyGen_GetCode (PyGenObject * gen ) {
438- _PyInterpreterFrame * frame = (_PyInterpreterFrame * )(gen -> gi_iframe );
439- return frame -> f_code ;
440- }
441-
442412static int
443413gen_is_coroutine (PyObject * o )
444414{
445415 if (PyGen_CheckExact (o )) {
446- PyCodeObject * code = _PyGen_GetCode ((PyGenObject * )o );
416+ PyCodeObject * code = PyGen_GetCode ((PyGenObject * )o );
447417 if (code -> co_flags & CO_ITERABLE_COROUTINE ) {
448418 return 1 ;
449419 }
You can’t perform that action at this time.
0 commit comments