]> granicus.if.org Git - python/commitdiff
Fix several C-API doc typos caught by tomo cocoa on docs@.
authorZachary Ware <zachary.ware@gmail.com>
Wed, 26 Feb 2014 16:40:38 +0000 (10:40 -0600)
committerZachary Ware <zachary.ware@gmail.com>
Wed, 26 Feb 2014 16:40:38 +0000 (10:40 -0600)
The signature and description of PyException_SetCause now use "cause"
rather than "ctx" to match the code.

Doc/c-api/exceptions.rst
Doc/c-api/module.rst
Doc/c-api/typeobj.rst

index c3d978f393f9a08d71c3c4c9503d89879fc06d10..0aa892d75d06a020f68b6139545f81c696c9e8e8 100644 (file)
@@ -306,7 +306,7 @@ in various ways.  There is a separate error indicator for each thread.
 
 .. c:function:: void PyErr_SyntaxLocation(char *filename, int lineno)
 
-   Like :c:func:`PyErr_SyntaxLocationExc`, but the col_offset parameter is
+   Like :c:func:`PyErr_SyntaxLocationEx`, but the col_offset parameter is
    omitted.
 
 
@@ -490,11 +490,11 @@ Exception Objects
    reference, as accessible from Python through :attr:`__cause__`.
 
 
-.. c:function:: void PyException_SetCause(PyObject *ex, PyObject *ctx)
+.. c:function:: void PyException_SetCause(PyObject *ex, PyObject *cause)
 
-   Set the cause associated with the exception to *ctx*.  Use *NULL* to clear
-   it.  There is no type check to make sure that *ctx* is either an exception
-   instance or :const:`None`.  This steals a reference to *ctx*.
+   Set the cause associated with the exception to *cause*.  Use *NULL* to clear
+   it.  There is no type check to make sure that *cause* is either an exception
+   instance or :const:`None`.  This steals a reference to *cause*.
 
    :attr:`__suppress_context__` is implicitly set to ``True`` by this function.
 
index e80e0eaa08e9f9b5f0dec0d4ec4303805aba8f60..bd461709fb4e0dfde3e67e502bba4c2dfa6a55b3 100644 (file)
@@ -113,7 +113,7 @@ There are only a few functions special to module objects.
 
    Return a pointer to the :c:type:`PyModuleDef` struct from which the module was
    created, or *NULL* if the module wasn't created with
-   :c:func:`PyModule_Create`.i
+   :c:func:`PyModule_Create`.
 
 .. c:function:: PyObject* PyState_FindModule(PyModuleDef *def)
 
index b2b80380f2fc910823c4c7706f4eccf46964172c..f3089d065e283e671fa2d38720156a5f9c831e33 100644 (file)
@@ -205,9 +205,8 @@ type objects) *must* have the :attr:`ob_size` field.
    bit currently defined is :const:`Py_PRINT_RAW`. When the :const:`Py_PRINT_RAW`
    flag bit is set, the instance should be printed the same way as :c:member:`~PyTypeObject.tp_str`
    would format it; when the :const:`Py_PRINT_RAW` flag bit is clear, the instance
-   should be printed the same was as :c:member:`~PyTypeObject.tp_repr` would format it. It should
-   return ``-1`` and set an exception condition when an error occurred during the
-   comparison.
+   should be printed the same way as :c:member:`~PyTypeObject.tp_repr` would format it. It should
+   return ``-1`` and set an exception condition when an error occurs.
 
    It is possible that the :c:member:`~PyTypeObject.tp_print` field will be deprecated. In any case,
    it is recommended not to define :c:member:`~PyTypeObject.tp_print`, but instead to rely on