Commit 198c522
committed
Python: Remove Win32 support from FileHandle
Removes supporting Win32 from FileHandle. FileHandle was designed
to manage opening & closing its own file reference. Python does
not provide a public API to open a file which returns a Win32 handle.
This leads to a contrived process of opening a file, getting a file
descriptor, and converting it to a Win32 handle. To be clear,
os.open() on Windows provides a POSIX FD.
FileHandle does not currently support a user providing an already
open file resource, which at this time seems to be the only
plausible use case of a Win32 handle being used.
For the sake of simplicity and getting out an initial release, we
will just error if the OPAQUE_WIN32 handle type is set.
(This however will leave Win32 support in the Cython layer as that
is a trivial switch that gets passed into the C library.)1 parent c15f520 commit 198c522
2 files changed
Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | | - | |
| 171 | + | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
184 | 187 | | |
185 | 188 | | |
186 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 14 | | |
22 | 15 | | |
23 | 16 | | |
24 | | - | |
| 17 | + | |
25 | 18 | | |
26 | 19 | | |
27 | 20 | | |
| |||
55 | 48 | | |
56 | 49 | | |
57 | 50 | | |
| 51 | + | |
| 52 | + | |
58 | 53 | | |
59 | 54 | | |
| 55 | + | |
| 56 | + | |
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
| |||
0 commit comments