Skip to content

Commit 7a7228c

Browse files
committed
Fix c-api/file.rst indexes
1 parent 504334c commit 7a7228c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Doc/c-api/file.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,21 @@ the :mod:`io` APIs instead.
6060
raised if the end of the file is reached immediately.
6161
6262
63+
.. c:type:: PyObject * (*Py_OpenCodeHookFunction)(PyObject *, void *)
64+
65+
Equivalent of :c:expr:`PyObject *(\*)(PyObject *path,
66+
void *userData)`, where *path* is guaranteed to be
67+
:c:type:`PyUnicodeObject`.
68+
69+
.. versionadded:: 3.8
70+
71+
6372
.. c:function:: int PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction handler)
6473
6574
Overrides the normal behavior of :func:`io.open_code` to pass its parameter
6675
through the provided handler.
6776
68-
The handler is a function of type:
69-
70-
.. c:type:: Py_OpenCodeHookFunction
71-
72-
Equivalent of :c:expr:`PyObject *(\*)(PyObject *path,
73-
void *userData)`, where *path* is guaranteed to be
74-
:c:type:`PyUnicodeObject`.
77+
The *handler* is a function of type :c:type:`Py_OpenCodeHookFunction`.
7578
7679
The *userData* pointer is passed into the hook function. Since hook
7780
functions may be called from different runtimes, this pointer should not

0 commit comments

Comments
 (0)