◐ Shell
clean mode source ↗

gh-87729: specialize LOAD_SUPER_ATTR_METHOD by carljm · Pull Request #103809 · python/cpython

I think this is breaking c++ extensions as class is a reserved keyword in c++

diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h
index 7d5d5e03de..f15328fd8e 100644
--- a/Include/internal/pycore_code.h
+++ b/Include/internal/pycore_code.h
@@ -226,7 +226,7 @@ extern int _PyLineTable_PreviousAddressRange(PyCodeAddressRange *range);

 /* Specialization functions */

-extern void _Py_Specialize_LoadSuperAttr(PyObject *global_super, PyObject *class, PyObject *self,
+extern void _Py_Specialize_LoadSuperAttr(PyObject *global_super, PyObject *klass, PyObject *self,
                                          _Py_CODEUNIT *instr, PyObject *name, int load_method);
 extern void _Py_Specialize_LoadAttr(PyObject *owner, _Py_CODEUNIT *instr,
                                     PyObject *name);

gets things compiling again, but I am not sure if this is the right fix (or you want to propagate the name change through the implementation as well).