summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapi
diff options
context:
space:
mode:
authorSergey B Kirpichev <skirpichev@gmail.com>2023-11-01 07:43:56 (GMT)
committerGitHub <noreply@github.com>2023-11-01 07:43:56 (GMT)
commit9619e517d4aef6ffd0143110da7af5b14c86edba (patch)
tree6d39f11688fc27447b4b54befe99285b1ddb0a1c /Modules/_testcapi
parent2162512d717e1a7f2bb24b31713ebce23542a2a2 (diff)
downloadcpython-9619e517d4aef6ffd0143110da7af5b14c86edba.zip
cpython-9619e517d4aef6ffd0143110da7af5b14c86edba.tar.gz
cpython-9619e517d4aef6ffd0143110da7af5b14c86edba.tar.bz2
[3.12] gh-111495: add stub files for C API test modules (GH-111586) (GH-111592)
This is to reduce merge conflicts (Modules/Setup.stdlib.in) for subsequent pull requests for the issue. (cherry picked from commit 33ed5fa69dbe25d64a910c450be527f4db9dc5dd)
Diffstat (limited to 'Modules/_testcapi')
-rw-r--r--Modules/_testcapi/bytearray.c17
-rw-r--r--Modules/_testcapi/bytes.c17
-rw-r--r--Modules/_testcapi/codec.c17
-rw-r--r--Modules/_testcapi/complex.c16
-rw-r--r--Modules/_testcapi/file.c17
-rw-r--r--Modules/_testcapi/list.c17
-rw-r--r--Modules/_testcapi/numbers.c16
-rw-r--r--Modules/_testcapi/parts.h12
-rw-r--r--Modules/_testcapi/tuple.c17
9 files changed, 144 insertions, 2 deletions
diff --git a/Modules/_testcapi/bytearray.c b/Modules/_testcapi/bytearray.c
new file mode 100644
index 0000000..6ddb8fe
--- /dev/null
+++ b/Modules/_testcapi/bytearray.c
@@ -0,0 +1,17 @@
+#include "parts.h"
+#include "util.h"
+
+
+static PyMethodDef test_methods[] = {
+ {NULL},
+};
+
+int
+_PyTestCapi_Init_ByteArray(PyObject *m)
+{
+ if (PyModule_AddFunctions(m, test_methods) < 0) {
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/Modules/_testcapi/bytes.c b/Modules/_testcapi/bytes.c
new file mode 100644
index 0000000..9fea716
--- /dev/null
+++ b/Modules/_testcapi/bytes.c
@@ -0,0 +1,17 @@
+#include "parts.h"
+#include "util.h"
+
+
+static PyMethodDef test_methods[] = {
+ {NULL},
+};
+
+int
+_PyTestCapi_Init_Bytes(PyObject *m)
+{
+ if (PyModule_AddFunctions(m, test_methods) < 0) {
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/Modules/_testcapi/codec.c b/Modules/_testcapi/codec.c
new file mode 100644
index 0000000..d13f51e
--- /dev/null
+++ b/Modules/_testcapi/codec.c
@@ -0,0 +1,17 @@
+#include "parts.h"
+#include "util.h"
+
+
+static PyMethodDef test_methods[] = {
+ {NULL},
+};
+
+int
+_PyTestCapi_Init_Codec(PyObject *m)
+{
+ if (PyModule_AddFunctions(m, test_methods) < 0){
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/Modules/_testcapi/complex.c b/Modules/_testcapi/complex.c
new file mode 100644
index 0000000..0402b8e
--- /dev/null
+++ b/Modules/_testcapi/complex.c
@@ -0,0 +1,16 @@
+#include "parts.h"
+#include "util.h"
+
+static PyMethodDef test_methods[] = {
+ {NULL},
+};
+
+int
+_PyTestCapi_Init_Complex(PyObject *mod)
+{
+ if (PyModule_AddFunctions(mod, test_methods) < 0) {
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/Modules/_testcapi/file.c b/Modules/_testcapi/file.c
new file mode 100644
index 0000000..634563f
--- /dev/null
+++ b/Modules/_testcapi/file.c
@@ -0,0 +1,17 @@
+#include "parts.h"
+#include "util.h"
+
+
+static PyMethodDef test_methods[] = {
+ {NULL},
+};
+
+int
+_PyTestCapi_Init_File(PyObject *m)
+{
+ if (PyModule_AddFunctions(m, test_methods) < 0){
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/Modules/_testcapi/list.c b/Modules/_testcapi/list.c
new file mode 100644
index 0000000..9329ddc
--- /dev/null
+++ b/Modules/_testcapi/list.c
@@ -0,0 +1,17 @@
+#include "parts.h"
+#include "util.h"
+
+
+static PyMethodDef test_methods[] = {
+ {NULL},
+};
+
+int
+_PyTestCapi_Init_List(PyObject *m)
+{
+ if (PyModule_AddFunctions(m, test_methods) < 0){
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/Modules/_testcapi/numbers.c b/Modules/_testcapi/numbers.c
new file mode 100644
index 0000000..6f7fa3f
--- /dev/null
+++ b/Modules/_testcapi/numbers.c
@@ -0,0 +1,16 @@
+#include "parts.h"
+#include "util.h"
+
+static PyMethodDef test_methods[] = {
+ {NULL},
+};
+
+int
+_PyTestCapi_Init_Numbers(PyObject *mod)
+{
+ if (PyModule_AddFunctions(mod, test_methods) < 0) {
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/Modules/_testcapi/parts.h b/Modules/_testcapi/parts.h
index c119c35..1dd0995 100644
--- a/Modules/_testcapi/parts.h
+++ b/Modules/_testcapi/parts.h
@@ -27,6 +27,8 @@
int _PyTestCapi_Init_Vectorcall(PyObject *module);
int _PyTestCapi_Init_Heaptype(PyObject *module);
int _PyTestCapi_Init_Abstract(PyObject *module);
+int _PyTestCapi_Init_ByteArray(PyObject *module);
+int _PyTestCapi_Init_Bytes(PyObject *module);
int _PyTestCapi_Init_Unicode(PyObject *module);
int _PyTestCapi_Init_GetArgs(PyObject *module);
int _PyTestCapi_Init_PyTime(PyObject *module);
@@ -36,16 +38,22 @@ int _PyTestCapi_Init_Mem(PyObject *module);
int _PyTestCapi_Init_Watchers(PyObject *module);
int _PyTestCapi_Init_Long(PyObject *module);
int _PyTestCapi_Init_Float(PyObject *module);
+int _PyTestCapi_Init_Complex(PyObject *module);
+int _PyTestCapi_Init_Numbers(PyObject *module);
int _PyTestCapi_Init_Dict(PyObject *module);
int _PyTestCapi_Init_Set(PyObject *module);
+int _PyTestCapi_Init_List(PyObject *module);
+int _PyTestCapi_Init_Tuple(PyObject *module);
int _PyTestCapi_Init_Structmember(PyObject *module);
int _PyTestCapi_Init_Exceptions(PyObject *module);
int _PyTestCapi_Init_Code(PyObject *module);
int _PyTestCapi_Init_Buffer(PyObject *module);
int _PyTestCapi_Init_PyOS(PyObject *module);
+int _PyTestCapi_Init_File(PyObject *module);
+int _PyTestCapi_Init_Codec(PyObject *module);
int _PyTestCapi_Init_Immortal(PyObject *module);
-int _PyTestCapi_Init_GC(PyObject *mod);
-int _PyTestCapi_Init_Sys(PyObject *);
+int _PyTestCapi_Init_GC(PyObject *module);
+int _PyTestCapi_Init_Sys(PyObject *module);
#ifdef LIMITED_API_AVAILABLE
int _PyTestCapi_Init_VectorcallLimited(PyObject *module);
diff --git a/Modules/_testcapi/tuple.c b/Modules/_testcapi/tuple.c
new file mode 100644
index 0000000..95dde8c
--- /dev/null
+++ b/Modules/_testcapi/tuple.c
@@ -0,0 +1,17 @@
+#include "parts.h"
+#include "util.h"
+
+
+static PyMethodDef test_methods[] = {
+ {NULL},
+};
+
+int
+_PyTestCapi_Init_Tuple(PyObject *m)
+{
+ if (PyModule_AddFunctions(m, test_methods) < 0){
+ return -1;
+ }
+
+ return 0;
+}