Skip to content

Commit 644e883

Browse files
committed
pythongh-84436 Add intergration C API tests for immortal objects
1 parent f6314b9 commit 644e883

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

Modules/Setup.stdlib.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
@MODULE__XXTESTFUZZ_TRUE@_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
170170
@MODULE__TESTBUFFER_TRUE@_testbuffer _testbuffer.c
171171
@MODULE__TESTINTERNALCAPI_TRUE@_testinternalcapi _testinternalcapi.c
172-
@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c _testcapi/vectorcall.c _testcapi/vectorcall_limited.c _testcapi/heaptype.c _testcapi/unicode.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/pyos.c
172+
@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c _testcapi/vectorcall.c _testcapi/vectorcall_limited.c _testcapi/heaptype.c _testcapi/unicode.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/pyos.c _testcapi/immortal.c
173173
@MODULE__TESTCLINIC_TRUE@_testclinic _testclinic.c
174174

175175
# Some testing modules MUST be built as shared libraries.

Modules/_testcapi/parts.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ int _PyTestCapi_Init_Structmember(PyObject *module);
3939
int _PyTestCapi_Init_Exceptions(PyObject *module);
4040
int _PyTestCapi_Init_Code(PyObject *module);
4141
int _PyTestCapi_Init_PyOS(PyObject *module);
42+
int _PyTestCapi_Init_Immortal(PyObject *module);
4243

4344
#ifdef LIMITED_API_AVAILABLE
4445
int _PyTestCapi_Init_VectorcallLimited(PyObject *module);

Modules/_testcapimodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4210,6 +4210,9 @@ PyInit__testcapi(void)
42104210
if (_PyTestCapi_Init_PyOS(m) < 0) {
42114211
return NULL;
42124212
}
4213+
if (_PyTestCapi_Init_Immortal(m) < 0) {
4214+
return NULL;
4215+
}
42134216

42144217
#ifndef LIMITED_API_AVAILABLE
42154218
PyModule_AddObjectRef(m, "LIMITED_API_AVAILABLE", Py_False);

PCbuild/_testcapi.vcxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
<ClCompile Include="..\Modules\_testcapi\exceptions.c" />
111111
<ClCompile Include="..\Modules\_testcapi\code.c" />
112112
<ClCompile Include="..\Modules\_testcapi\pyos.c" />
113+
<ClCompile Include="..\Modules\_testcapi\immortal.c" />
113114
</ItemGroup>
114115
<ItemGroup>
115116
<ResourceCompile Include="..\PC\python_nt.rc" />
@@ -127,4 +128,4 @@
127128
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
128129
<ImportGroup Label="ExtensionTargets">
129130
</ImportGroup>
130-
</Project>
131+
</Project>

0 commit comments

Comments
 (0)