Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaf83cde

Browse files
committed
gh-101100: Fix sphinx warnings inc-api/file.rst
1 parentc63c614 commitaf83cde

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

‎Doc/c-api/file.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ the :mod:`io` APIs instead.
6565
Overrides the normal behavior of :func:`io.open_code` to pass its parameter
6666
through the provided handler.
6767
68-
The handler is a function of type :c:expr:`PyObject *(\*)(PyObject *path,
69-
void *userData)`, where *path* is guaranteed to be:c:type:`PyUnicodeObject`.
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:c:type:`PyUnicodeObject`.
7074
7175
The *userData* pointer is passed into the hook function. Since hook
7276
functions may be called from different runtimes, this pointer should not
@@ -87,7 +91,6 @@ the :mod:`io` APIs instead.
8791
..versionadded::3.8
8892
8993
90-
9194
..c:function::intPyFile_WriteObject(PyObject *obj, PyObject *p, int flags)
9295
9396
..index::single: Py_PRINT_RAW

‎Doc/c-api/object.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ Object Protocol
1919
to NotImplemented and return it).
2020

2121

22+
..c:macro:: Py_PRINT_RAW
23+
24+
Flag to be used with multiple functions that print the object (like:c:func:`PyObject_Print` and:c:func:`PyFile_WriteObject`).
25+
If passed, these function would use the:func:`str` of the object
26+
instead of the:func:`repr`.
27+
28+
2229
..c:function::intPyObject_Print(PyObject *o, FILE *fp, int flags)
2330
2431
Print an object *o*, on file *fp*. Returns ``-1`` on error. The flags argument

‎Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
Doc/c-api/descriptor.rst
66
Doc/c-api/exceptions.rst
7-
Doc/c-api/file.rst
87
Doc/c-api/float.rst
98
Doc/c-api/gcsupport.rst
109
Doc/c-api/init.rst

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp