Skip to content

gh-116417: Fix WASI build of _testlimitedcapi #116974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Modules/_testlimitedcapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Modules/_testlimitedcapi/bytearray.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Modules/_testlimitedcapi/bytes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion Modules/_testlimitedcapi/heaptype_relative.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion Modules/_testlimitedcapi/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 8 additions & 8 deletions Modules/_testlimitedcapi/parts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Modules/_testlimitedcapi/pyos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Modules/_testlimitedcapi/set.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Modules/_testlimitedcapi/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion Modules/_testlimitedcapi/vectorcall_limited.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down