| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0846055 commit c5605df
84 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -160,7 +160,7 @@ variable(s) whose address should be passed. | |||
| 160 | 160 | In both cases, *\*buffer_length* is set to the length of the encoded data | |
| 161 | 161 | without the trailing NUL byte. | |
| 162 | 162 | ||
| 163 | - ``et#`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer] | ||
| 163 | + ``et#`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer, int \*buffer_length] | ||
| 164 | 164 | Same as ``es#`` except that string objects are passed through without recoding | |
| 165 | 165 | them. Instead, the implementation assumes that the string object uses the | |
| 166 | 166 | encoding passed in as parameter. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -144,7 +144,7 @@ Buffer related functions | |||
| 144 | 144 | kind of buffer the caller is prepared to deal with and therefore what | |
| 145 | 145 | kind of buffer the exporter is allowed to return. The buffer interface | |
| 146 | 146 | allows for complicated memory sharing possibilities, but some caller may | |
| 147 | - not be able to handle all the complexibity but may want to see if the | ||
| 147 | + not be able to handle all the complexity but may want to see if the | ||
| 148 | 148 | exporter will let them take a simpler view to its memory. | |
| 149 | 149 | ||
| 150 | 150 | Some exporters may not be able to share memory in every possible way and | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -64,16 +64,16 @@ Floating Point Objects | |||
| 64 | 64 | around the header file :file:`float.h`. | |
| 65 | 65 | ||
| 66 | 66 | ||
| 67 | - .. cfunction:: double PyFloat_GetMax(void) | ||
| 67 | + .. cfunction:: double PyFloat_GetMax() | ||
| 68 | 68 | ||
| 69 | 69 | Return the maximum representable finite float *DBL_MAX* as C :ctype:`double`. | |
| 70 | 70 | ||
| 71 | 71 | ||
| 72 | - .. cfunction:: double PyFloat_GetMin(void) | ||
| 72 | + .. cfunction:: double PyFloat_GetMin() | ||
| 73 | 73 | ||
| 74 | 74 | Return the minimum normalized positive float *DBL_MIN* as C :ctype:`double`. | |
| 75 | 75 | ||
| 76 | - .. cfunction:: int PyFloat_ClearFreeList(void) | ||
| 76 | + .. cfunction:: int PyFloat_ClearFreeList() | ||
| 77 | 77 | ||
| 78 | 78 | Clear the float free list. Return the number of items that could not | |
| 79 | 79 | be freed. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -137,7 +137,7 @@ Importing Modules | |||
| 137 | 137 | *path*, possibly by fetching it from the :data:`sys.path_importer_cache` | |
| 138 | 138 | dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook | |
| 139 | 139 | is found that can handle the path item. Return ``None`` if no hook could; | |
| 140 | - this tells our caller it should fall back to the builtin import mechanism. | ||
| 140 | + this tells our caller it should fall back to the built-in import mechanism. | ||
| 141 | 141 | Cache the result in :data:`sys.path_importer_cache`. Return a new reference | |
| 142 | 142 | to the importer object. | |
| 143 | 143 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,7 +94,7 @@ no longer available. | |||
| 94 | 94 | Macro version of :cfunc:`PyMethod_Self` which avoids error checking. | |
| 95 | 95 | ||
| 96 | 96 | ||
| 97 | - .. cfunction:: int PyMethod_ClearFreeList(void) | ||
| 97 | + .. cfunction:: int PyMethod_ClearFreeList() | ||
| 98 | 98 | ||
| 99 | 99 | Clear the free list. Return the total number of freed items. | |
| 100 | 100 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -146,12 +146,10 @@ convention flags can be combined with a binding flag. | |||
| 146 | 146 | ||
| 147 | 147 | This is the typical calling convention, where the methods have the type | |
| 148 | 148 | :ctype:`PyCFunction`. The function expects two :ctype:`PyObject\*` values. | |
| 149 | - The first one is the *self* object for methods; for module functions, it | ||
| 150 | - has the value given to :cfunc:`Py_InitModule4` (or *NULL* if | ||
| 151 | - :cfunc:`Py_InitModule` was used). The second parameter (often called | ||
| 152 | - *args*) is a tuple object representing all arguments. This parameter is | ||
| 153 | - typically processed using :cfunc:`PyArg_ParseTuple` or | ||
| 154 | - :cfunc:`PyArg_UnpackTuple`. | ||
| 149 | + The first one is the *self* object for methods; for module functions, it is | ||
| 150 | + the module object. The second parameter (often called *args*) is a tuple | ||
| 151 | + object representing all arguments. This parameter is typically processed | ||
| 152 | + using :cfunc:`PyArg_ParseTuple` or :cfunc:`PyArg_UnpackTuple`. | ||
| 155 | 153 | ||
| 156 | 154 | ||
| 157 | 155 | .. data:: METH_KEYWORDS | |
@@ -167,9 +165,9 @@ convention flags can be combined with a binding flag. | |||
| 167 | 165 | ||
| 168 | 166 | Methods without parameters don't need to check whether arguments are given if | |
| 169 | 167 | they are listed with the :const:`METH_NOARGS` flag. They need to be of type | |
| 170 | - :ctype:`PyCFunction`. When used with object methods, the first parameter is | ||
| 171 | - typically named ``self`` and will hold a reference to the object instance. | ||
| 172 | - In all cases the second parameter will be *NULL*. | ||
| 168 | + :ctype:`PyCFunction`. The first parameter is typically named *self* and will | ||
| 169 | + hold a reference to the module or object instance. In all cases the second | ||
| 170 | + parameter will be *NULL*. | ||
| 173 | 171 | ||
| 174 | 172 | ||
| 175 | 173 | .. data:: METH_O | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -73,7 +73,7 @@ accessible to C code. They all work with the current interpreter thread's | |||
| 73 | 73 | case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` | |
| 74 | 74 | on error. | |
| 75 | 75 | ||
| 76 | - .. cfunction:: void PySys_ResetWarnOptions(void) | ||
| 76 | + .. cfunction:: void PySys_ResetWarnOptions() | ||
| 77 | 77 | ||
| 78 | 78 | Reset :data:`sys.warnoptions` to an empty list. | |
| 79 | 79 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -107,6 +107,6 @@ Tuple Objects | |||
| 107 | 107 | raises :exc:`MemoryError` or :exc:`SystemError`. | |
| 108 | 108 | ||
| 109 | 109 | ||
| 110 | - .. cfunction:: int PyTuple_ClearFreeList(void) | ||
| 110 | + .. cfunction:: int PyTuple_ClearFreeList() | ||
| 111 | 111 | ||
| 112 | 112 | Clear the free list. Return the total number of freed items. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,7 +33,7 @@ Type Objects | |||
| 33 | 33 | standard type object. Return false in all other cases. | |
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | - .. cfunction:: unsigned int PyType_ClearCache(void) | ||
| 36 | + .. cfunction:: unsigned int PyType_ClearCache() | ||
| 37 | 37 | ||
| 38 | 38 | Clear the internal lookup cache. Return the current version tag. | |
| 39 | 39 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -84,10 +84,11 @@ access internal read-only data of Unicode objects: | |||
| 84 | 84 | :ctype:`PyUnicodeObject` (not checked). | |
| 85 | 85 | ||
| 86 | 86 | ||
| 87 | - .. cfunction:: int PyUnicode_ClearFreeList(void) | ||
| 87 | + .. cfunction:: int PyUnicode_ClearFreeList() | ||
| 88 | 88 | ||
| 89 | 89 | Clear the free list. Return the total number of freed items. | |
| 90 | 90 | ||
| 91 | + | ||
| 91 | 92 | Unicode provides many different character properties. The most often needed ones | |
| 92 | 93 | are available through these macros which are mapped to C functions depending on | |
| 93 | 94 | the Python configuration. | |
@@ -372,12 +373,12 @@ the system's :ctype:`wchar_t`. | |||
| 372 | 373 | Built-in Codecs | |
| 373 | 374 | ^^^^^^^^^^^^^^^ | |
| 374 | 375 | ||
| 375 | - Python provides a set of builtin codecs which are written in C for speed. All of | ||
| 376 | + Python provides a set of built-in codecs which are written in C for speed. All of | ||
| 376 | 377 | these codecs are directly usable via the following functions. | |
| 377 | 378 | ||
| 378 | 379 | Many of the following APIs take two arguments encoding and errors. These | |
| 379 | 380 | parameters encoding and errors have the same semantics as the ones of the | |
| 380 | - builtin unicode() Unicode object constructor. | ||
| 381 | + built-in :func:`unicode` Unicode object constructor. | ||
| 381 | 382 | ||
| 382 | 383 | Setting encoding to *NULL* causes the default encoding to be used | |
| 383 | 384 | which is ASCII. The file system calls should use | |
@@ -389,7 +390,7 @@ pointer to a static string, on others, it will change at run-time | |||
| 389 | 390 | ||
| 390 | 391 | Error handling is set by errors which may also be set to *NULL* meaning to use | |
| 391 | 392 | the default handling defined for the codec. Default error handling for all | |
| 392 | - builtin codecs is "strict" (:exc:`ValueError` is raised). | ||
| 393 | + built-in codecs is "strict" (:exc:`ValueError` is raised). | ||
| 393 | 394 | ||
| 394 | 395 | The codecs all use a similar interface. Only deviation from the following | |
| 395 | 396 | generic ones are documented for simplicity. | |
@@ -403,7 +404,7 @@ These are the generic codec APIs: | |||
| 403 | 404 | ||
| 404 | 405 | Create a Unicode object by decoding *size* bytes of the encoded string *s*. | |
| 405 | 406 | *encoding* and *errors* have the same meaning as the parameters of the same name | |
| 406 | - in the :func:`unicode` builtin function. The codec to be used is looked up | ||
| 407 | + in the :func:`unicode` built-in function. The codec to be used is looked up | ||
| 407 | 408 | using the Python codec registry. Return *NULL* if an exception was raised by | |
| 408 | 409 | the codec. | |
| 409 | 410 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments