| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f7252f6 commit cf2ecbc
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -65,8 +65,13 @@ the :mod:`io` APIs instead. | |||
| 65 | 65 | Overrides the normal behavior of :func:`io.open_code` to pass its parameter | |
| 66 | 66 | through the provided handler. | |
| 67 | 67 | ||
| 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 | ||
| 74 | + :c:type:`PyUnicodeObject`. | ||
| 70 | 75 | ||
| 71 | 76 | The *userData* pointer is passed into the hook function. Since hook | |
| 72 | 77 | functions may be called from different runtimes, this pointer should not | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,6 +19,14 @@ Object Protocol | |||
| 19 | 19 | to NotImplemented and return it). | |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | + .. c:macro:: Py_PRINT_RAW | ||
| 23 | + | ||
| 24 | + Flag to be used with multiple functions that print the object (like | ||
| 25 | + :c:func:`PyObject_Print` and :c:func:`PyFile_WriteObject`). | ||
| 26 | + If passed, these function would use the :func:`str` of the object | ||
| 27 | + instead of the :func:`repr`. | ||
| 28 | + | ||
| 29 | + | ||
| 22 | 30 | .. c:function:: int PyObject_Print(PyObject *o, FILE *fp, int flags) | |
| 23 | 31 | ||
| 24 | 32 | Print an object *o*, on file *fp*. Returns ``-1`` on error. The flags argument | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,6 @@ | |||
| 5 | 5 | Doc/c-api/arg.rst | |
| 6 | 6 | Doc/c-api/descriptor.rst | |
| 7 | 7 | Doc/c-api/exceptions.rst | |
| 8 | - Doc/c-api/file.rst | ||
| 9 | 8 | Doc/c-api/float.rst | |
| 10 | 9 | Doc/c-api/gcsupport.rst | |
| 11 | 10 | Doc/c-api/init.rst | |
| Back | FazBrowse Home | New Git URL |
0 commit comments