summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-03-18 22:06:52 (GMT)
committerGitHub <noreply@github.com>2024-03-18 22:06:52 (GMT)
commitdc2d0f46540159aa22774777791105140e4d74c1 (patch)
treeeba332effc6ad828ca5e7ee9400d10c42815a341 /Modules
parent165cb4578c3cbd4d21faf1050193c297662fd031 (diff)
downloadcpython-dc2d0f46540159aa22774777791105140e4d74c1.zip
cpython-dc2d0f46540159aa22774777791105140e4d74c1.tar.gz
cpython-dc2d0f46540159aa22774777791105140e4d74c1.tar.bz2
gh-116417: Fix WASI build of _testlimitedcapi (#116974)
Use different function names between _testcapi and _testlimitedcapi to not confuse the WASI linker.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_testlimitedcapi.c16
-rw-r--r--Modules/_testlimitedcapi/bytearray.c2
-rw-r--r--Modules/_testlimitedcapi/bytes.c2
-rw-r--r--Modules/_testlimitedcapi/heaptype_relative.c3
-rw-r--r--Modules/_testlimitedcapi/list.c2
-rw-r--r--Modules/_testlimitedcapi/parts.h16
-rw-r--r--Modules/_testlimitedcapi/pyos.c2
-rw-r--r--Modules/_testlimitedcapi/set.c2
-rw-r--r--Modules/_testlimitedcapi/sys.c2
-rw-r--r--Modules/_testlimitedcapi/vectorcall_limited.c3
10 files changed, 26 insertions, 24 deletions
diff --git a/Modules/_testlimitedcapi.c b/Modules/_testlimitedcapi.c
index a25b0aa..9edc4fe 100644
--- a/Modules/_testlimitedcapi.c
+++ b/Modules/_testlimitedcapi.c
@@ -26,28 +26,28 @@ PyInit__testlimitedcapi(void)
return NULL;
}
- if (_PyTestCapi_Init_ByteArray(mod) < 0) {
+ if (_PyTestLimitedCAPI_Init_ByteArray(mod) < 0) {
return NULL;
}
- if (_PyTestCapi_Init_Bytes(mod) < 0) {
+ if (_PyTestLimitedCAPI_Init_Bytes(mod) < 0) {
return NULL;
}
- if (_PyTestCapi_Init_HeaptypeRelative(mod) < 0) {
+ if (_PyTestLimitedCAPI_Init_HeaptypeRelative(mod) < 0) {
return NULL;
}
- if (_PyTestCapi_Init_List(mod) < 0) {
+ if (_PyTestLimitedCAPI_Init_List(mod) < 0) {
return NULL;
}
- if (_PyTestCapi_Init_PyOS(mod) < 0) {
+ if (_PyTestLimitedCAPI_Init_PyOS(mod) < 0) {
return NULL;
}
- if (_PyTestCapi_Init_Set(mod) < 0) {
+ if (_PyTestLimitedCAPI_Init_Set(mod) < 0) {
return NULL;
}
- if (_PyTestCapi_Init_Sys(mod) < 0) {
+ if (_PyTestLimitedCAPI_Init_Sys(mod) < 0) {
return NULL;
}
- if (_PyTestCapi_Init_VectorcallLimited(mod) < 0) {
+ if (_PyTestLimitedCAPI_Init_VectorcallLimited(mod) < 0) {
return NULL;
}
return mod;
diff --git a/Modules/_testlimitedcapi/bytearray.c b/Modules/_testlimitedcapi/bytearray.c
index dc47ed2..68b029e 100644
--- a/Modules/_testlimitedcapi/bytearray.c
+++ b/Modules/_testlimitedcapi/bytearray.c
@@ -113,7 +113,7 @@ static PyMethodDef test_methods[] = {
};
int
-_PyTestCapi_Init_ByteArray(PyObject *m)
+_PyTestLimitedCAPI_Init_ByteArray(PyObject *m)
{
if (PyModule_AddFunctions(m, test_methods) < 0) {
return -1;
diff --git a/Modules/_testlimitedcapi/bytes.c b/Modules/_testlimitedcapi/bytes.c
index a14c4f9..157d408 100644
--- a/Modules/_testlimitedcapi/bytes.c
+++ b/Modules/_testlimitedcapi/bytes.c
@@ -245,7 +245,7 @@ static PyMethodDef test_methods[] = {
};
int
-_PyTestCapi_Init_Bytes(PyObject *m)
+_PyTestLimitedCAPI_Init_Bytes(PyObject *m)
{
if (PyModule_AddFunctions(m, test_methods) < 0) {
return -1;
diff --git a/Modules/_testlimitedcapi/heaptype_relative.c b/Modules/_testlimitedcapi/heaptype_relative.c
index d0316dd..7c508c6 100644
--- a/Modules/_testlimitedcapi/heaptype_relative.c
+++ b/Modules/_testlimitedcapi/heaptype_relative.c
@@ -331,7 +331,8 @@ static PyMethodDef TestMethods[] = {
};
int
-_PyTestCapi_Init_HeaptypeRelative(PyObject *m) {
+_PyTestLimitedCAPI_Init_HeaptypeRelative(PyObject *m)
+{
if (PyModule_AddFunctions(m, TestMethods) < 0) {
return -1;
}
diff --git a/Modules/_testlimitedcapi/list.c b/Modules/_testlimitedcapi/list.c
index 0917900..3022cbf 100644
--- a/Modules/_testlimitedcapi/list.c
+++ b/Modules/_testlimitedcapi/list.c
@@ -159,7 +159,7 @@ static PyMethodDef test_methods[] = {
};
int
-_PyTestCapi_Init_List(PyObject *m)
+_PyTestLimitedCAPI_Init_List(PyObject *m)
{
if (PyModule_AddFunctions(m, test_methods) < 0) {
return -1;
diff --git a/Modules/_testlimitedcapi/parts.h b/Modules/_testlimitedcapi/parts.h
index bb867ec..ee67f10 100644
--- a/Modules/_testlimitedcapi/parts.h
+++ b/Modules/_testlimitedcapi/parts.h
@@ -22,13 +22,13 @@
# error "Py_BUILD_CORE macro must not be defined"
#endif
-int _PyTestCapi_Init_ByteArray(PyObject *module);
-int _PyTestCapi_Init_Bytes(PyObject *module);
-int _PyTestCapi_Init_HeaptypeRelative(PyObject *module);
-int _PyTestCapi_Init_List(PyObject *module);
-int _PyTestCapi_Init_PyOS(PyObject *module);
-int _PyTestCapi_Init_Set(PyObject *module);
-int _PyTestCapi_Init_Sys(PyObject *module);
-int _PyTestCapi_Init_VectorcallLimited(PyObject *module);
+int _PyTestLimitedCAPI_Init_ByteArray(PyObject *module);
+int _PyTestLimitedCAPI_Init_Bytes(PyObject *module);
+int _PyTestLimitedCAPI_Init_HeaptypeRelative(PyObject *module);
+int _PyTestLimitedCAPI_Init_List(PyObject *module);
+int _PyTestLimitedCAPI_Init_PyOS(PyObject *module);
+int _PyTestLimitedCAPI_Init_Set(PyObject *module);
+int _PyTestLimitedCAPI_Init_Sys(PyObject *module);
+int _PyTestLimitedCAPI_Init_VectorcallLimited(PyObject *module);
#endif // Py_TESTLIMITEDCAPI_PARTS_H
diff --git a/Modules/_testlimitedcapi/pyos.c b/Modules/_testlimitedcapi/pyos.c
index 63140e9..0f61801 100644
--- a/Modules/_testlimitedcapi/pyos.c
+++ b/Modules/_testlimitedcapi/pyos.c
@@ -50,7 +50,7 @@ static PyMethodDef test_methods[] = {
};
int
-_PyTestCapi_Init_PyOS(PyObject *mod)
+_PyTestLimitedCAPI_Init_PyOS(PyObject *mod)
{
if (PyModule_AddFunctions(mod, test_methods) < 0) {
return -1;
diff --git a/Modules/_testlimitedcapi/set.c b/Modules/_testlimitedcapi/set.c
index 471b515..35da5fa 100644
--- a/Modules/_testlimitedcapi/set.c
+++ b/Modules/_testlimitedcapi/set.c
@@ -179,7 +179,7 @@ static PyMethodDef test_methods[] = {
};
int
-_PyTestCapi_Init_Set(PyObject *m)
+_PyTestLimitedCAPI_Init_Set(PyObject *m)
{
if (PyModule_AddFunctions(m, test_methods) < 0) {
return -1;
diff --git a/Modules/_testlimitedcapi/sys.c b/Modules/_testlimitedcapi/sys.c
index aa40e3c..7d8b7a8 100644
--- a/Modules/_testlimitedcapi/sys.c
+++ b/Modules/_testlimitedcapi/sys.c
@@ -46,7 +46,7 @@ static PyMethodDef test_methods[] = {
};
int
-_PyTestCapi_Init_Sys(PyObject *m)
+_PyTestLimitedCAPI_Init_Sys(PyObject *m)
{
if (PyModule_AddFunctions(m, test_methods) < 0) {
return -1;
diff --git a/Modules/_testlimitedcapi/vectorcall_limited.c b/Modules/_testlimitedcapi/vectorcall_limited.c
index fc1a89c..784126c 100644
--- a/Modules/_testlimitedcapi/vectorcall_limited.c
+++ b/Modules/_testlimitedcapi/vectorcall_limited.c
@@ -182,7 +182,8 @@ static PyMethodDef TestMethods[] = {
};
int
-_PyTestCapi_Init_VectorcallLimited(PyObject *m) {
+_PyTestLimitedCAPI_Init_VectorcallLimited(PyObject *m)
+{
if (PyModule_AddFunctions(m, TestMethods) < 0) {
return -1;
}