Skip to content

Commit

Permalink
Restore PyPy 3.8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
wjakob committed Jun 1, 2023
1 parent ff790d9 commit cd8135b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cmake/darwin-ld-pypy.sym
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
-U _PyPyCFunction_Check
-U _PyPyCFunction_GetFunction
-U _PyPyCFunction_Type
-U _PyPyCFunction_NewEx
-U _PyPyCMethod_New
-U _PyPyCallIter_New
-U _PyPyCallable_Check
Expand Down Expand Up @@ -898,6 +899,7 @@
-U __PyPyObject_GetDictPtr
-U __PyPyObject_New
-U __PyPyObject_NewVar
-U __PyPyObject_Vectorcall
-U __PyPyPyGC_AddMemoryPressure
-U __PyPyPy_Free
-U __PyPyPy_Malloc
Expand Down
4 changes: 2 additions & 2 deletions src/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,11 @@ PyObject *obj_vectorcall(PyObject *base, PyObject *const *args, size_t nargsf,
if (method_call) {
PyObject *self = PyObject_GetAttr(args[0], /* name = */ base);
if (self) {
res = _PyObject_Vectorcall(self, args + 1, nargsf - 1, kwnames);
res = _PyObject_Vectorcall(self, (PyObject **) args + 1, nargsf - 1, kwnames);
Py_DECREF(self);
}
} else {
res = _PyObject_Vectorcall(base, args, nargsf, kwnames);
res = _PyObject_Vectorcall(base, (PyObject **) args, nargsf, kwnames);
}
#else
res = (method_call ? PyObject_VectorcallMethod
Expand Down

0 comments on commit cd8135b

Please sign in to comment.