mirror of https://github.com/python/cpython
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:
parent
165cb4578c
commit
dc2d0f4654
|
@ -26,28 +26,28 @@ PyInit__testlimitedcapi(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_PyTestCapi_Init_ByteArray(mod) < 0) {
|
if (_PyTestLimitedCAPI_Init_ByteArray(mod) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (_PyTestCapi_Init_Bytes(mod) < 0) {
|
if (_PyTestLimitedCAPI_Init_Bytes(mod) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (_PyTestCapi_Init_HeaptypeRelative(mod) < 0) {
|
if (_PyTestLimitedCAPI_Init_HeaptypeRelative(mod) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (_PyTestCapi_Init_List(mod) < 0) {
|
if (_PyTestLimitedCAPI_Init_List(mod) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (_PyTestCapi_Init_PyOS(mod) < 0) {
|
if (_PyTestLimitedCAPI_Init_PyOS(mod) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (_PyTestCapi_Init_Set(mod) < 0) {
|
if (_PyTestLimitedCAPI_Init_Set(mod) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (_PyTestCapi_Init_Sys(mod) < 0) {
|
if (_PyTestLimitedCAPI_Init_Sys(mod) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (_PyTestCapi_Init_VectorcallLimited(mod) < 0) {
|
if (_PyTestLimitedCAPI_Init_VectorcallLimited(mod) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return mod;
|
return mod;
|
||||||
|
|
|
@ -113,7 +113,7 @@ static PyMethodDef test_methods[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
_PyTestCapi_Init_ByteArray(PyObject *m)
|
_PyTestLimitedCAPI_Init_ByteArray(PyObject *m)
|
||||||
{
|
{
|
||||||
if (PyModule_AddFunctions(m, test_methods) < 0) {
|
if (PyModule_AddFunctions(m, test_methods) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -245,7 +245,7 @@ static PyMethodDef test_methods[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
_PyTestCapi_Init_Bytes(PyObject *m)
|
_PyTestLimitedCAPI_Init_Bytes(PyObject *m)
|
||||||
{
|
{
|
||||||
if (PyModule_AddFunctions(m, test_methods) < 0) {
|
if (PyModule_AddFunctions(m, test_methods) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -331,7 +331,8 @@ static PyMethodDef TestMethods[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
_PyTestCapi_Init_HeaptypeRelative(PyObject *m) {
|
_PyTestLimitedCAPI_Init_HeaptypeRelative(PyObject *m)
|
||||||
|
{
|
||||||
if (PyModule_AddFunctions(m, TestMethods) < 0) {
|
if (PyModule_AddFunctions(m, TestMethods) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,7 +159,7 @@ static PyMethodDef test_methods[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
_PyTestCapi_Init_List(PyObject *m)
|
_PyTestLimitedCAPI_Init_List(PyObject *m)
|
||||||
{
|
{
|
||||||
if (PyModule_AddFunctions(m, test_methods) < 0) {
|
if (PyModule_AddFunctions(m, test_methods) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
# error "Py_BUILD_CORE macro must not be defined"
|
# error "Py_BUILD_CORE macro must not be defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int _PyTestCapi_Init_ByteArray(PyObject *module);
|
int _PyTestLimitedCAPI_Init_ByteArray(PyObject *module);
|
||||||
int _PyTestCapi_Init_Bytes(PyObject *module);
|
int _PyTestLimitedCAPI_Init_Bytes(PyObject *module);
|
||||||
int _PyTestCapi_Init_HeaptypeRelative(PyObject *module);
|
int _PyTestLimitedCAPI_Init_HeaptypeRelative(PyObject *module);
|
||||||
int _PyTestCapi_Init_List(PyObject *module);
|
int _PyTestLimitedCAPI_Init_List(PyObject *module);
|
||||||
int _PyTestCapi_Init_PyOS(PyObject *module);
|
int _PyTestLimitedCAPI_Init_PyOS(PyObject *module);
|
||||||
int _PyTestCapi_Init_Set(PyObject *module);
|
int _PyTestLimitedCAPI_Init_Set(PyObject *module);
|
||||||
int _PyTestCapi_Init_Sys(PyObject *module);
|
int _PyTestLimitedCAPI_Init_Sys(PyObject *module);
|
||||||
int _PyTestCapi_Init_VectorcallLimited(PyObject *module);
|
int _PyTestLimitedCAPI_Init_VectorcallLimited(PyObject *module);
|
||||||
|
|
||||||
#endif // Py_TESTLIMITEDCAPI_PARTS_H
|
#endif // Py_TESTLIMITEDCAPI_PARTS_H
|
||||||
|
|
|
@ -50,7 +50,7 @@ static PyMethodDef test_methods[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
_PyTestCapi_Init_PyOS(PyObject *mod)
|
_PyTestLimitedCAPI_Init_PyOS(PyObject *mod)
|
||||||
{
|
{
|
||||||
if (PyModule_AddFunctions(mod, test_methods) < 0) {
|
if (PyModule_AddFunctions(mod, test_methods) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -179,7 +179,7 @@ static PyMethodDef test_methods[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
_PyTestCapi_Init_Set(PyObject *m)
|
_PyTestLimitedCAPI_Init_Set(PyObject *m)
|
||||||
{
|
{
|
||||||
if (PyModule_AddFunctions(m, test_methods) < 0) {
|
if (PyModule_AddFunctions(m, test_methods) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -46,7 +46,7 @@ static PyMethodDef test_methods[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
_PyTestCapi_Init_Sys(PyObject *m)
|
_PyTestLimitedCAPI_Init_Sys(PyObject *m)
|
||||||
{
|
{
|
||||||
if (PyModule_AddFunctions(m, test_methods) < 0) {
|
if (PyModule_AddFunctions(m, test_methods) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -182,7 +182,8 @@ static PyMethodDef TestMethods[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
_PyTestCapi_Init_VectorcallLimited(PyObject *m) {
|
_PyTestLimitedCAPI_Init_VectorcallLimited(PyObject *m)
|
||||||
|
{
|
||||||
if (PyModule_AddFunctions(m, TestMethods) < 0) {
|
if (PyModule_AddFunctions(m, TestMethods) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue