summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-08-13 08:26:44 (GMT)
committerGeorg Brandl <georg@python.org>2009-08-13 08:26:44 (GMT)
commitc5605dffdb226e85f415bd6edb441dad714fbc0c (patch)
treed6b21f2376be108b3a7bb8996e5456580451ddd7 /Doc/c-api
parent084605518d27574e7ad43d0f68a4e8cc37585d37 (diff)
downloadcpython-c5605dffdb226e85f415bd6edb441dad714fbc0c.zip
cpython-c5605dffdb226e85f415bd6edb441dad714fbc0c.tar.gz
cpython-c5605dffdb226e85f415bd6edb441dad714fbc0c.tar.bz2
Merged revisions 73941-73943,74076,74094,74186,74211-74214,74247,74254,74262,74311,74334,74368 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ................ r73941 | georg.brandl | 2009-07-11 12:39:00 +0200 (Sa, 11 Jul 2009) | 9 lines Merged revisions 73940 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73940 | georg.brandl | 2009-07-11 12:37:38 +0200 (Sa, 11 Jul 2009) | 1 line #6430: add note about size of "u" type. ........ ................ r73942 | georg.brandl | 2009-07-11 12:39:23 +0200 (Sa, 11 Jul 2009) | 1 line #6430: remove mention of "w" array typecode. ................ r73943 | georg.brandl | 2009-07-11 12:43:08 +0200 (Sa, 11 Jul 2009) | 1 line #6421: The self argument of module-level PyCFunctions is now a reference to the module object. ................ r74076 | georg.brandl | 2009-07-18 11:07:48 +0200 (Sa, 18 Jul 2009) | 1 line #6502: add missing comma in docstring. ................ r74094 | georg.brandl | 2009-07-19 09:25:56 +0200 (So, 19 Jul 2009) | 10 lines Recorded merge of revisions 74089 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74089 | senthil.kumaran | 2009-07-19 04:43:43 +0200 (So, 19 Jul 2009) | 3 lines Fix for issue5102, timeout value propages between redirects, proxy, digest and auth handlers. Fixed tests to reflect the same. ........ ................ r74186 | georg.brandl | 2009-07-23 11:19:09 +0200 (Do, 23 Jul 2009) | 9 lines Recorded merge of revisions 74185 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74185 | georg.brandl | 2009-07-23 11:17:09 +0200 (Do, 23 Jul 2009) | 1 line Fix the "pylocals" gdb command. ........ ................ r74211 | georg.brandl | 2009-07-26 16:48:09 +0200 (So, 26 Jul 2009) | 9 lines Recorded merge of revisions 74210 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74210 | georg.brandl | 2009-07-26 16:44:23 +0200 (So, 26 Jul 2009) | 1 line Move member descriptions inside the classes. ........ ................ r74212 | georg.brandl | 2009-07-26 16:54:51 +0200 (So, 26 Jul 2009) | 9 lines Merged revisions 74209 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74209 | georg.brandl | 2009-07-26 16:37:28 +0200 (So, 26 Jul 2009) | 1 line builtin -> built-in. ........ ................ r74213 | georg.brandl | 2009-07-26 17:02:41 +0200 (So, 26 Jul 2009) | 9 lines Merged revisions 74207 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74207 | georg.brandl | 2009-07-26 16:19:57 +0200 (So, 26 Jul 2009) | 1 line #6577: fix (hopefully) all links to builtin instead of module/class-specific objects. ........ ................ r74214 | georg.brandl | 2009-07-26 17:03:49 +0200 (So, 26 Jul 2009) | 9 lines Merged revisions 74205 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74205 | georg.brandl | 2009-07-26 15:36:39 +0200 (So, 26 Jul 2009) | 1 line #6576: fix cross-refs in re docs. ........ ................ r74247 | georg.brandl | 2009-07-29 09:27:08 +0200 (Mi, 29 Jul 2009) | 9 lines Merged revisions 74239 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74239 | georg.brandl | 2009-07-28 18:55:32 +0000 (Di, 28 Jul 2009) | 1 line Clarify quote_plus() usage. ........ ................ r74254 | georg.brandl | 2009-07-29 18:14:16 +0200 (Mi, 29 Jul 2009) | 1 line #6586: fix return/argument type doc for os.read() and os.write(). ................ r74262 | alexandre.vassalotti | 2009-07-29 21:54:39 +0200 (Mi, 29 Jul 2009) | 57 lines Merged revisions 74074,74077,74111,74188,74192-74193,74200,74252-74253,74258-74261 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74074 | georg.brandl | 2009-07-18 05:03:10 -0400 (Sat, 18 Jul 2009) | 1 line #6513: fix example code: warning categories are classes, not instances. ........ r74077 | georg.brandl | 2009-07-18 05:43:40 -0400 (Sat, 18 Jul 2009) | 1 line #6489: fix an ambiguity in getiterator() documentation. ........ r74111 | benjamin.peterson | 2009-07-20 09:30:10 -0400 (Mon, 20 Jul 2009) | 1 line remove docs for deprecated -p option ........ r74188 | benjamin.peterson | 2009-07-23 10:25:31 -0400 (Thu, 23 Jul 2009) | 1 line use bools ........ r74192 | georg.brandl | 2009-07-24 12:28:38 -0400 (Fri, 24 Jul 2009) | 1 line Fix arg types of et#. ........ r74193 | georg.brandl | 2009-07-24 12:46:38 -0400 (Fri, 24 Jul 2009) | 1 line Dont put "void" in signature for nullary functions. ........ r74200 | georg.brandl | 2009-07-25 09:02:15 -0400 (Sat, 25 Jul 2009) | 1 line #6571: add index entries for more operators. ........ r74252 | georg.brandl | 2009-07-29 12:06:31 -0400 (Wed, 29 Jul 2009) | 1 line #6593: fix link targets. ........ r74253 | georg.brandl | 2009-07-29 12:09:17 -0400 (Wed, 29 Jul 2009) | 1 line #6591: add reference to ioctl in fcntl module for platforms other than Windows. ........ r74258 | georg.brandl | 2009-07-29 12:57:05 -0400 (Wed, 29 Jul 2009) | 1 line Add a link to readline, and mention IPython and bpython. ........ r74259 | georg.brandl | 2009-07-29 13:07:21 -0400 (Wed, 29 Jul 2009) | 1 line Fix some markup and small factual glitches found by M. Markert. ........ r74260 | georg.brandl | 2009-07-29 13:15:20 -0400 (Wed, 29 Jul 2009) | 1 line Fix a few markup glitches. ........ r74261 | georg.brandl | 2009-07-29 13:50:25 -0400 (Wed, 29 Jul 2009) | 1 line Rewrite the section about classes a bit; mostly tidbits, and a larger update to the section about "private" variables to reflect the Pythonic consensus better. ........ ................ r74311 | georg.brandl | 2009-08-04 22:29:27 +0200 (Di, 04 Aug 2009) | 1 line Slightly improve buffer-related error message. ................ r74334 | georg.brandl | 2009-08-06 19:51:03 +0200 (Do, 06 Aug 2009) | 1 line #6648: mention surrogateescape handler where all standard handlers are listed. ................ r74368 | georg.brandl | 2009-08-13 09:56:35 +0200 (Do, 13 Aug 2009) | 21 lines Merged revisions 74328,74332-74333,74365 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74328 | georg.brandl | 2009-08-06 17:06:25 +0200 (Do, 06 Aug 2009) | 1 line Fix base keyword arg name for int() and long(). ........ r74332 | georg.brandl | 2009-08-06 19:23:21 +0200 (Do, 06 Aug 2009) | 1 line Fix punctuation and one copy-paste error. ........ r74333 | georg.brandl | 2009-08-06 19:43:55 +0200 (Do, 06 Aug 2009) | 1 line #6658: fix two typos. ........ r74365 | georg.brandl | 2009-08-13 09:48:05 +0200 (Do, 13 Aug 2009) | 1 line #6679: Remove mention that sub supports no flags. ........ ................
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/arg.rst2
-rw-r--r--Doc/c-api/buffer.rst2
-rw-r--r--Doc/c-api/float.rst6
-rw-r--r--Doc/c-api/import.rst2
-rw-r--r--Doc/c-api/method.rst2
-rw-r--r--Doc/c-api/structures.rst16
-rw-r--r--Doc/c-api/sys.rst2
-rw-r--r--Doc/c-api/tuple.rst2
-rw-r--r--Doc/c-api/type.rst2
-rw-r--r--Doc/c-api/unicode.rst11
10 files changed, 23 insertions, 24 deletions
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
index e968c8f..7d7fc56 100644
--- a/Doc/c-api/arg.rst
+++ b/Doc/c-api/arg.rst
@@ -160,7 +160,7 @@ variable(s) whose address should be passed.
In both cases, *\*buffer_length* is set to the length of the encoded data
without the trailing NUL byte.
-``et#`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer]
+``et#`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer, int \*buffer_length]
Same as ``es#`` except that string objects are passed through without recoding
them. Instead, the implementation assumes that the string object uses the
encoding passed in as parameter.
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst
index 6ad4f7b..97adb07 100644
--- a/Doc/c-api/buffer.rst
+++ b/Doc/c-api/buffer.rst
@@ -144,7 +144,7 @@ Buffer related functions
kind of buffer the caller is prepared to deal with and therefore what
kind of buffer the exporter is allowed to return. The buffer interface
allows for complicated memory sharing possibilities, but some caller may
- not be able to handle all the complexibity but may want to see if the
+ not be able to handle all the complexity but may want to see if the
exporter will let them take a simpler view to its memory.
Some exporters may not be able to share memory in every possible way and
diff --git a/Doc/c-api/float.rst b/Doc/c-api/float.rst
index 77a8b83..e2e4b73 100644
--- a/Doc/c-api/float.rst
+++ b/Doc/c-api/float.rst
@@ -64,16 +64,16 @@ Floating Point Objects
around the header file :file:`float.h`.
-.. cfunction:: double PyFloat_GetMax(void)
+.. cfunction:: double PyFloat_GetMax()
Return the maximum representable finite float *DBL_MAX* as C :ctype:`double`.
-.. cfunction:: double PyFloat_GetMin(void)
+.. cfunction:: double PyFloat_GetMin()
Return the minimum normalized positive float *DBL_MIN* as C :ctype:`double`.
-.. cfunction:: int PyFloat_ClearFreeList(void)
+.. cfunction:: int PyFloat_ClearFreeList()
Clear the float free list. Return the number of items that could not
be freed.
diff --git a/Doc/c-api/import.rst b/Doc/c-api/import.rst
index ac4cde5..2e3f71f 100644
--- a/Doc/c-api/import.rst
+++ b/Doc/c-api/import.rst
@@ -137,7 +137,7 @@ Importing Modules
*path*, possibly by fetching it from the :data:`sys.path_importer_cache`
dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook
is found that can handle the path item. Return ``None`` if no hook could;
- this tells our caller it should fall back to the builtin import mechanism.
+ this tells our caller it should fall back to the built-in import mechanism.
Cache the result in :data:`sys.path_importer_cache`. Return a new reference
to the importer object.
diff --git a/Doc/c-api/method.rst b/Doc/c-api/method.rst
index 9ee49ba..d8b2ed8 100644
--- a/Doc/c-api/method.rst
+++ b/Doc/c-api/method.rst
@@ -94,7 +94,7 @@ no longer available.
Macro version of :cfunc:`PyMethod_Self` which avoids error checking.
-.. cfunction:: int PyMethod_ClearFreeList(void)
+.. cfunction:: int PyMethod_ClearFreeList()
Clear the free list. Return the total number of freed items.
diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst
index 7048968..87bd362 100644
--- a/Doc/c-api/structures.rst
+++ b/Doc/c-api/structures.rst
@@ -146,12 +146,10 @@ convention flags can be combined with a binding flag.
This is the typical calling convention, where the methods have the type
:ctype:`PyCFunction`. The function expects two :ctype:`PyObject\*` values.
- The first one is the *self* object for methods; for module functions, it
- has the value given to :cfunc:`Py_InitModule4` (or *NULL* if
- :cfunc:`Py_InitModule` was used). The second parameter (often called
- *args*) is a tuple object representing all arguments. This parameter is
- typically processed using :cfunc:`PyArg_ParseTuple` or
- :cfunc:`PyArg_UnpackTuple`.
+ The first one is the *self* object for methods; for module functions, it is
+ the module object. The second parameter (often called *args*) is a tuple
+ object representing all arguments. This parameter is typically processed
+ using :cfunc:`PyArg_ParseTuple` or :cfunc:`PyArg_UnpackTuple`.
.. data:: METH_KEYWORDS
@@ -167,9 +165,9 @@ convention flags can be combined with a binding flag.
Methods without parameters don't need to check whether arguments are given if
they are listed with the :const:`METH_NOARGS` flag. They need to be of type
- :ctype:`PyCFunction`. When used with object methods, the first parameter is
- typically named ``self`` and will hold a reference to the object instance.
- In all cases the second parameter will be *NULL*.
+ :ctype:`PyCFunction`. The first parameter is typically named *self* and will
+ hold a reference to the module or object instance. In all cases the second
+ parameter will be *NULL*.
.. data:: METH_O
diff --git a/Doc/c-api/sys.rst b/Doc/c-api/sys.rst
index 15f1af4..adadfe5 100644
--- a/Doc/c-api/sys.rst
+++ b/Doc/c-api/sys.rst
@@ -73,7 +73,7 @@ accessible to C code. They all work with the current interpreter thread's
case *name* is deleted from the sys module. Returns ``0`` on success, ``-1``
on error.
-.. cfunction:: void PySys_ResetWarnOptions(void)
+.. cfunction:: void PySys_ResetWarnOptions()
Reset :data:`sys.warnoptions` to an empty list.
diff --git a/Doc/c-api/tuple.rst b/Doc/c-api/tuple.rst
index a66f043..c1f8e12 100644
--- a/Doc/c-api/tuple.rst
+++ b/Doc/c-api/tuple.rst
@@ -107,6 +107,6 @@ Tuple Objects
raises :exc:`MemoryError` or :exc:`SystemError`.
-.. cfunction:: int PyTuple_ClearFreeList(void)
+.. cfunction:: int PyTuple_ClearFreeList()
Clear the free list. Return the total number of freed items.
diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst
index 07f82c9..d0edd55 100644
--- a/Doc/c-api/type.rst
+++ b/Doc/c-api/type.rst
@@ -33,7 +33,7 @@ Type Objects
standard type object. Return false in all other cases.
-.. cfunction:: unsigned int PyType_ClearCache(void)
+.. cfunction:: unsigned int PyType_ClearCache()
Clear the internal lookup cache. Return the current version tag.
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index e348ee7..dc48158 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -84,10 +84,11 @@ access internal read-only data of Unicode objects:
:ctype:`PyUnicodeObject` (not checked).
-.. cfunction:: int PyUnicode_ClearFreeList(void)
+.. cfunction:: int PyUnicode_ClearFreeList()
Clear the free list. Return the total number of freed items.
+
Unicode provides many different character properties. The most often needed ones
are available through these macros which are mapped to C functions depending on
the Python configuration.
@@ -372,12 +373,12 @@ the system's :ctype:`wchar_t`.
Built-in Codecs
^^^^^^^^^^^^^^^
-Python provides a set of builtin codecs which are written in C for speed. All of
+Python provides a set of built-in codecs which are written in C for speed. All of
these codecs are directly usable via the following functions.
Many of the following APIs take two arguments encoding and errors. These
parameters encoding and errors have the same semantics as the ones of the
-builtin unicode() Unicode object constructor.
+built-in :func:`unicode` Unicode object constructor.
Setting encoding to *NULL* causes the default encoding to be used
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
Error handling is set by errors which may also be set to *NULL* meaning to use
the default handling defined for the codec. Default error handling for all
-builtin codecs is "strict" (:exc:`ValueError` is raised).
+built-in codecs is "strict" (:exc:`ValueError` is raised).
The codecs all use a similar interface. Only deviation from the following
generic ones are documented for simplicity.
@@ -403,7 +404,7 @@ These are the generic codec APIs:
Create a Unicode object by decoding *size* bytes of the encoded string *s*.
*encoding* and *errors* have the same meaning as the parameters of the same name
- in the :func:`unicode` builtin function. The codec to be used is looked up
+ in the :func:`unicode` built-in function. The codec to be used is looked up
using the Python codec registry. Return *NULL* if an exception was raised by
the codec.