mirror of
https://github.com/python/cpython.git
synced 2026-10-28 18:35:21 +08:00
gh-116417: Fix WASI build of _testlimitedcapi (#116974)
Use different function names between _testcapi and _testlimitedcapi to not confuse the WASI linker.
This commit is contained in:
1 parent
165cb4578c
commit
dc2d0f4654
10 files changed
+26
-24
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user