diff options
author | Dong-hee Na <donghee.na@python.org> | 2023-08-14 23:25:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-14 23:25:57 (GMT) |
commit | 580f357c663bd704a0903e4174cdf458cac56416 (patch) | |
tree | 526803aef3098faabeb53a52eba0ffaf0792e2ad /Modules/_testcapi | |
parent | 8d3cb1bc4b5de091d7b5fcc5ce7378151a8f4f45 (diff) | |
download | cpython-580f357c663bd704a0903e4174cdf458cac56416.zip cpython-580f357c663bd704a0903e4174cdf458cac56416.tar.gz cpython-580f357c663bd704a0903e4174cdf458cac56416.tar.bz2 |
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 2e27da18952c6561f48dab706b5911135cedd7cf.
Diffstat (limited to 'Modules/_testcapi')
-rw-r--r-- | Modules/_testcapi/clinic/vectorcall_limited.c.h | 42 | ||||
-rw-r--r-- | Modules/_testcapi/vectorcall_limited.c | 30 |
2 files changed, 4 insertions, 68 deletions
diff --git a/Modules/_testcapi/clinic/vectorcall_limited.c.h b/Modules/_testcapi/clinic/vectorcall_limited.c.h deleted file mode 100644 index bc89f58..0000000 --- a/Modules/_testcapi/clinic/vectorcall_limited.c.h +++ /dev/null @@ -1,42 +0,0 @@ -/*[clinic input] -preserve -[clinic start generated code]*/ - -#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) -# include "pycore_gc.h" // PyGC_Head -# include "pycore_runtime.h" // _Py_ID() -#endif - - -#if defined(LIMITED_API_AVAILABLE) - -PyDoc_STRVAR(_testcapi_call_vectorcall__doc__, -"call_vectorcall($module, callable, /)\n" -"--\n" -"\n"); - -#define _TESTCAPI_CALL_VECTORCALL_METHODDEF \ - {"call_vectorcall", (PyCFunction)_testcapi_call_vectorcall, METH_O, _testcapi_call_vectorcall__doc__}, - -#endif /* defined(LIMITED_API_AVAILABLE) */ - -#if defined(LIMITED_API_AVAILABLE) - -PyDoc_STRVAR(_testcapi_call_vectorcall_method__doc__, -"call_vectorcall_method($module, callable, /)\n" -"--\n" -"\n"); - -#define _TESTCAPI_CALL_VECTORCALL_METHOD_METHODDEF \ - {"call_vectorcall_method", (PyCFunction)_testcapi_call_vectorcall_method, METH_O, _testcapi_call_vectorcall_method__doc__}, - -#endif /* defined(LIMITED_API_AVAILABLE) */ - -#ifndef _TESTCAPI_CALL_VECTORCALL_METHODDEF - #define _TESTCAPI_CALL_VECTORCALL_METHODDEF -#endif /* !defined(_TESTCAPI_CALL_VECTORCALL_METHODDEF) */ - -#ifndef _TESTCAPI_CALL_VECTORCALL_METHOD_METHODDEF - #define _TESTCAPI_CALL_VECTORCALL_METHOD_METHODDEF -#endif /* !defined(_TESTCAPI_CALL_VECTORCALL_METHOD_METHODDEF) */ -/*[clinic end generated code: output=409028b637aba77b input=a9049054013a1b77]*/ diff --git a/Modules/_testcapi/vectorcall_limited.c b/Modules/_testcapi/vectorcall_limited.c index 9f02c7a..a96925e 100644 --- a/Modules/_testcapi/vectorcall_limited.c +++ b/Modules/_testcapi/vectorcall_limited.c @@ -1,6 +1,5 @@ #define Py_LIMITED_API 0x030c0000 // 3.12 #include "parts.h" -#include "clinic/vectorcall_limited.c.h" #ifdef LIMITED_API_AVAILABLE @@ -8,11 +7,6 @@ /* Test Vectorcall in the limited API */ -/*[clinic input] -module _testcapi -[clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=6361033e795369fc]*/ - static PyObject * LimitedVectorCallClass_tpcall(PyObject *self, PyObject *args, PyObject *kwargs) { return PyUnicode_FromString("tp_call called"); @@ -38,16 +32,8 @@ LimitedVectorCallClass_new(PyTypeObject *tp, PyTypeObject *a, PyTypeObject *kw) return self; } -/*[clinic input] -_testcapi.call_vectorcall - - callable: object - / -[clinic start generated code]*/ - static PyObject * -_testcapi_call_vectorcall(PyObject *module, PyObject *callable) -/*[clinic end generated code: output=bae81eec97fcaad7 input=55d88f92240957ee]*/ +call_vectorcall(PyObject* self, PyObject *callable) { PyObject *args[3] = { NULL, NULL, NULL }; PyObject *kwname = NULL, *kwnames = NULL, *result = NULL; @@ -91,16 +77,8 @@ leave: return result; } -/*[clinic input] -_testcapi.call_vectorcall_method - - callable: object - / -[clinic start generated code]*/ - static PyObject * -_testcapi_call_vectorcall_method(PyObject *module, PyObject *callable) -/*[clinic end generated code: output=e661f48dda08b6fb input=5ba81c27511395b6]*/ +call_vectorcall_method(PyObject* self, PyObject *callable) { PyObject *args[3] = { NULL, NULL, NULL }; PyObject *name = NULL, *kwname = NULL, @@ -175,8 +153,8 @@ static PyType_Spec LimitedVectorCallClass_spec = { }; static PyMethodDef TestMethods[] = { - _TESTCAPI_CALL_VECTORCALL_METHODDEF - _TESTCAPI_CALL_VECTORCALL_METHOD_METHODDEF + {"call_vectorcall", call_vectorcall, METH_O}, + {"call_vectorcall_method", call_vectorcall_method, METH_O}, {NULL}, }; |