Skip to content

Commit 62ac8f8

Browse files
committed
Add Modules/_testcapi/file.c
1 parent 99abea3 commit 62ac8f8

File tree

6 files changed

+26
-1
lines changed

6 files changed

+26
-1
lines changed

Modules/Setup.stdlib.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
@MODULE__XXTESTFUZZ_TRUE@_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
160160
@MODULE__TESTBUFFER_TRUE@_testbuffer _testbuffer.c
161161
@MODULE__TESTINTERNALCAPI_TRUE@_testinternalcapi _testinternalcapi.c _testinternalcapi/test_lock.c _testinternalcapi/pytime.c _testinternalcapi/set.c
162-
@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c _testcapi/vectorcall.c _testcapi/vectorcall_limited.c _testcapi/heaptype.c _testcapi/abstract.c _testcapi/bytearray.c _testcapi/bytes.c _testcapi/unicode.c _testcapi/dict.c _testcapi/set.c _testcapi/list.c _testcapi/tuple.c _testcapi/getargs.c _testcapi/datetime.c _testcapi/docstring.c _testcapi/mem.c _testcapi/watchers.c _testcapi/long.c _testcapi/float.c _testcapi/complex.c _testcapi/numbers.c _testcapi/structmember.c _testcapi/exceptions.c _testcapi/code.c _testcapi/buffer.c _testcapi/pyatomic.c _testcapi/pyos.c _testcapi/immortal.c _testcapi/heaptype_relative.c _testcapi/gc.c _testcapi/sys.c
162+
@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c _testcapi/vectorcall.c _testcapi/vectorcall_limited.c _testcapi/heaptype.c _testcapi/abstract.c _testcapi/bytearray.c _testcapi/bytes.c _testcapi/unicode.c _testcapi/dict.c _testcapi/set.c _testcapi/list.c _testcapi/tuple.c _testcapi/getargs.c _testcapi/datetime.c _testcapi/docstring.c _testcapi/mem.c _testcapi/watchers.c _testcapi/long.c _testcapi/float.c _testcapi/complex.c _testcapi/numbers.c _testcapi/structmember.c _testcapi/exceptions.c _testcapi/code.c _testcapi/buffer.c _testcapi/pyatomic.c _testcapi/pyos.c _testcapi/file.c _testcapi/immortal.c _testcapi/heaptype_relative.c _testcapi/gc.c _testcapi/sys.c
163163
@MODULE__TESTCLINIC_TRUE@_testclinic _testclinic.c
164164
@MODULE__TESTCLINIC_LIMITED_TRUE@_testclinic_limited _testclinic_limited.c
165165

Modules/_testcapi/file.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include "parts.h"
2+
#include "util.h"
3+
4+
5+
static PyMethodDef test_methods[] = {
6+
{NULL},
7+
};
8+
9+
int
10+
_PyTestCapi_Init_File(PyObject *m)
11+
{
12+
if (PyModule_AddFunctions(m, test_methods) < 0){
13+
return -1;
14+
}
15+
16+
return 0;
17+
}

Modules/_testcapi/parts.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ int _PyTestCapi_Init_Code(PyObject *module);
5353
int _PyTestCapi_Init_Buffer(PyObject *module);
5454
int _PyTestCapi_Init_PyAtomic(PyObject *module);
5555
int _PyTestCapi_Init_PyOS(PyObject *module);
56+
int _PyTestCapi_Init_File(PyObject *module);
5657
int _PyTestCapi_Init_Immortal(PyObject *module);
5758
int _PyTestCapi_Init_GC(PyObject *module);
5859
int _PyTestCapi_Init_Sys(PyObject *module);

Modules/_testcapimodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3971,6 +3971,9 @@ PyInit__testcapi(void)
39713971
if (_PyTestCapi_Init_PyOS(m) < 0) {
39723972
return NULL;
39733973
}
3974+
if (_PyTestCapi_Init_File(m) < 0) {
3975+
return NULL;
3976+
}
39743977
if (_PyTestCapi_Init_Sys(m) < 0) {
39753978
return NULL;
39763979
}

PCbuild/_testcapi.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
<ClCompile Include="..\Modules\_testcapi\buffer.c" />
122122
<ClCompile Include="..\Modules\_testcapi\pyatomic.c" />
123123
<ClCompile Include="..\Modules\_testcapi\pyos.c" />
124+
<ClCompile Include="..\Modules\_testcapi\file.c" />
124125
<ClCompile Include="..\Modules\_testcapi\sys.c" />
125126
<ClCompile Include="..\Modules\_testcapi\immortal.c" />
126127
<ClCompile Include="..\Modules\_testcapi\gc.c" />

PCbuild/_testcapi.vcxproj.filters

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@
9393
<ClCompile Include="..\Modules\_testcapi\pyos.c">
9494
<Filter>Source Files</Filter>
9595
</ClCompile>
96+
<ClCompile Include="..\Modules\_testcapi\file.c">
97+
<Filter>Source Files</Filter>
98+
</ClCompile>
9699
<ClCompile Include="..\Modules\_testcapi\sys.c">
97100
<Filter>Source Files</Filter>
98101
</ClCompile>

0 commit comments

Comments
 (0)