mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[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 33ed5fa69d)
This commit is contained in:
parent
2162512d71
commit
9619e517d4
13 changed files with 204 additions and 3 deletions
|
|
@ -168,7 +168,7 @@
|
|||
@MODULE__XXTESTFUZZ_TRUE@_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
|
||||
@MODULE__TESTBUFFER_TRUE@_testbuffer _testbuffer.c
|
||||
@MODULE__TESTINTERNALCAPI_TRUE@_testinternalcapi _testinternalcapi.c
|
||||
@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c _testcapi/vectorcall.c _testcapi/vectorcall_limited.c _testcapi/heaptype.c _testcapi/abstract.c _testcapi/unicode.c _testcapi/dict.c _testcapi/set.c _testcapi/getargs.c _testcapi/pytime.c _testcapi/datetime.c _testcapi/docstring.c _testcapi/mem.c _testcapi/watchers.c _testcapi/long.c _testcapi/float.c _testcapi/structmember.c _testcapi/exceptions.c _testcapi/code.c _testcapi/buffer.c _testcapi/pyos.c _testcapi/immortal.c _testcapi/heaptype_relative.c _testcapi/gc.c _testcapi/sys.c
|
||||
@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c _testcapi/vectorcall.c _testcapi/vectorcall_limited.c _testcapi/heaptype.c _testcapi/abstract.c _testcapi/bytearray.c _testcapi/bytes.c _testcapi/unicode.c _testcapi/dict.c _testcapi/set.c _testcapi/list.c _testcapi/tuple.c _testcapi/getargs.c _testcapi/pytime.c _testcapi/datetime.c _testcapi/docstring.c _testcapi/mem.c _testcapi/watchers.c _testcapi/long.c _testcapi/float.c _testcapi/complex.c _testcapi/numbers.c _testcapi/structmember.c _testcapi/exceptions.c _testcapi/code.c _testcapi/buffer.c _testcapi/pyos.c _testcapi/file.c _testcapi/codec.c _testcapi/immortal.c _testcapi/heaptype_relative.c _testcapi/gc.c _testcapi/sys.c
|
||||
@MODULE__TESTCLINIC_TRUE@_testclinic _testclinic.c
|
||||
|
||||
# Some testing modules MUST be built as shared libraries.
|
||||
|
|
|
|||
17
Modules/_testcapi/bytearray.c
Normal file
17
Modules/_testcapi/bytearray.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
17
Modules/_testcapi/bytes.c
Normal file
17
Modules/_testcapi/bytes.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
17
Modules/_testcapi/codec.c
Normal file
17
Modules/_testcapi/codec.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
16
Modules/_testcapi/complex.c
Normal file
16
Modules/_testcapi/complex.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
17
Modules/_testcapi/file.c
Normal file
17
Modules/_testcapi/file.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
17
Modules/_testcapi/list.c
Normal file
17
Modules/_testcapi/list.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
16
Modules/_testcapi/numbers.c
Normal file
16
Modules/_testcapi/numbers.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
17
Modules/_testcapi/tuple.c
Normal file
17
Modules/_testcapi/tuple.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -3979,6 +3979,12 @@ PyInit__testcapi(void)
|
|||
if (_PyTestCapi_Init_Abstract(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (_PyTestCapi_Init_ByteArray(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (_PyTestCapi_Init_Bytes(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (_PyTestCapi_Init_Unicode(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -4006,12 +4012,24 @@ PyInit__testcapi(void)
|
|||
if (_PyTestCapi_Init_Float(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (_PyTestCapi_Init_Complex(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (_PyTestCapi_Init_Numbers(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (_PyTestCapi_Init_Dict(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (_PyTestCapi_Init_Set(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (_PyTestCapi_Init_List(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (_PyTestCapi_Init_Tuple(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (_PyTestCapi_Init_Structmember(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -4027,6 +4045,12 @@ PyInit__testcapi(void)
|
|||
if (_PyTestCapi_Init_PyOS(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (_PyTestCapi_Init_File(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (_PyTestCapi_Init_Codec(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (_PyTestCapi_Init_Sys(m) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue