Skip to content

Commit 580f357

Browse files
authored
Revert "gh-104469 : Convert _testcapi/vectorcall_limited.c to use AC … (gh-107951)
Revert "gh-104469 : Convert _testcapi/vectorcall_limited.c to use AC (gh-107857)" This reverts commit 2e27da1.
1 parent 8d3cb1b commit 580f357

File tree

2 files changed

+4
-68
lines changed

2 files changed

+4
-68
lines changed

Modules/_testcapi/clinic/vectorcall_limited.c.h

-42
This file was deleted.

Modules/_testcapi/vectorcall_limited.c

+4-26
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
#define Py_LIMITED_API 0x030c0000 // 3.12
22
#include "parts.h"
3-
#include "clinic/vectorcall_limited.c.h"
43

54
#ifdef LIMITED_API_AVAILABLE
65

76

87

98
/* Test Vectorcall in the limited API */
109

11-
/*[clinic input]
12-
module _testcapi
13-
[clinic start generated code]*/
14-
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=6361033e795369fc]*/
15-
1610
static PyObject *
1711
LimitedVectorCallClass_tpcall(PyObject *self, PyObject *args, PyObject *kwargs) {
1812
return PyUnicode_FromString("tp_call called");
@@ -38,16 +32,8 @@ LimitedVectorCallClass_new(PyTypeObject *tp, PyTypeObject *a, PyTypeObject *kw)
3832
return self;
3933
}
4034

41-
/*[clinic input]
42-
_testcapi.call_vectorcall
43-
44-
callable: object
45-
/
46-
[clinic start generated code]*/
47-
4835
static PyObject *
49-
_testcapi_call_vectorcall(PyObject *module, PyObject *callable)
50-
/*[clinic end generated code: output=bae81eec97fcaad7 input=55d88f92240957ee]*/
36+
call_vectorcall(PyObject* self, PyObject *callable)
5137
{
5238
PyObject *args[3] = { NULL, NULL, NULL };
5339
PyObject *kwname = NULL, *kwnames = NULL, *result = NULL;
@@ -91,16 +77,8 @@ _testcapi_call_vectorcall(PyObject *module, PyObject *callable)
9177
return result;
9278
}
9379

94-
/*[clinic input]
95-
_testcapi.call_vectorcall_method
96-
97-
callable: object
98-
/
99-
[clinic start generated code]*/
100-
10180
static PyObject *
102-
_testcapi_call_vectorcall_method(PyObject *module, PyObject *callable)
103-
/*[clinic end generated code: output=e661f48dda08b6fb input=5ba81c27511395b6]*/
81+
call_vectorcall_method(PyObject* self, PyObject *callable)
10482
{
10583
PyObject *args[3] = { NULL, NULL, NULL };
10684
PyObject *name = NULL, *kwname = NULL,
@@ -175,8 +153,8 @@ static PyType_Spec LimitedVectorCallClass_spec = {
175153
};
176154

177155
static PyMethodDef TestMethods[] = {
178-
_TESTCAPI_CALL_VECTORCALL_METHODDEF
179-
_TESTCAPI_CALL_VECTORCALL_METHOD_METHODDEF
156+
{"call_vectorcall", call_vectorcall, METH_O},
157+
{"call_vectorcall_method", call_vectorcall_method, METH_O},
180158
{NULL},
181159
};
182160

0 commit comments

Comments
 (0)