Merged revisions 70642,70648,70656,70661,70765,70773,70789,70824-70825,70828,70830,70832,70836,70838,70842,70851,70855,70857-70858 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70642 | georg.brandl | 2009-03-28 01:48:48 +0100 (Sa, 28 Mär 2009) | 1 line

  Fix typo.
........
  r70648 | georg.brandl | 2009-03-28 20:10:37 +0100 (Sa, 28 Mär 2009) | 1 line

  #5324: document __subclasses__().
........
  r70656 | georg.brandl | 2009-03-28 20:33:33 +0100 (Sa, 28 Mär 2009) | 2 lines

  Add a script to fixup rst files if the pre-commit hook rejects them.
........
  r70661 | georg.brandl | 2009-03-28 20:57:36 +0100 (Sa, 28 Mär 2009) | 2 lines

  Add section numbering to some of the larger subdocuments.
........
  r70765 | georg.brandl | 2009-03-31 00:09:34 +0200 (Di, 31 Mär 2009) | 1 line

  #5199: make warning about vars() assignment more visible.
........
  r70773 | georg.brandl | 2009-03-31 00:43:00 +0200 (Di, 31 Mär 2009) | 1 line

  #5039: make it clear that the impl. note refers to CPython.
........
  r70789 | georg.brandl | 2009-03-31 03:25:15 +0200 (Di, 31 Mär 2009) | 1 line

  Fix a wrong struct field assignment (docstring as closure).
........
  r70824 | georg.brandl | 2009-03-31 17:43:20 +0200 (Di, 31 Mär 2009) | 1 line

  #5519: remove reference to Kodos, which seems dead.
........
  r70825 | georg.brandl | 2009-03-31 17:46:30 +0200 (Di, 31 Mär 2009) | 1 line

  #5566: fix versionadded from PyLong ssize_t functions.
........
  r70828 | georg.brandl | 2009-03-31 17:50:16 +0200 (Di, 31 Mär 2009) | 1 line

  #5581: fget argument of abstractproperty is optional as well.
........
  r70830 | georg.brandl | 2009-03-31 18:11:45 +0200 (Di, 31 Mär 2009) | 1 line

  #5529: backport new docs of import semantics written by Brett to 2.x.
........
  r70832 | georg.brandl | 2009-03-31 18:31:11 +0200 (Di, 31 Mär 2009) | 1 line

  #1386675: specify WindowsError as the exception, because it has a winerror attribute that EnvironmentError doesnt have.
........
  r70836 | georg.brandl | 2009-03-31 18:50:25 +0200 (Di, 31 Mär 2009) | 1 line

  #5417: replace references to undocumented functions by ones to documented functions.
........
  r70838 | georg.brandl | 2009-03-31 18:54:38 +0200 (Di, 31 Mär 2009) | 1 line

  #992207: document that the parser only accepts \\n newlines.
........
  r70842 | georg.brandl | 2009-03-31 19:13:06 +0200 (Di, 31 Mär 2009) | 1 line

  #970783: document PyObject_Generic[GS]etAttr.
........
  r70851 | georg.brandl | 2009-03-31 20:26:55 +0200 (Di, 31 Mär 2009) | 1 line

  #837577: note cryptic return value of spawn*e on invalid env dicts.
........
  r70855 | georg.brandl | 2009-03-31 20:30:37 +0200 (Di, 31 Mär 2009) | 1 line

  #5245: note that PyRun_SimpleString doesnt return on SystemExit.
........
  r70857 | georg.brandl | 2009-03-31 20:33:10 +0200 (Di, 31 Mär 2009) | 1 line

  #5227: note that Py_Main doesnt return on SystemExit.
........
  r70858 | georg.brandl | 2009-03-31 20:38:56 +0200 (Di, 31 Mär 2009) | 1 line

  #5241: document missing U in regex howto.
........
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst
index 8e45384..b3ceb94 100644
--- a/Doc/extending/extending.rst
+++ b/Doc/extending/extending.rst
@@ -465,10 +465,10 @@
 (but note that *temp* will not be  *NULL* in this context).  More info on them
 in section :ref:`refcounts`.
 
-.. index:: single: PyEval_CallObject()
+.. index:: single: PyObject_CallObject()
 
 Later, when it is time to call the function, you call the C function
-:cfunc:`PyEval_CallObject`.  This function has two arguments, both pointers to
+:cfunc:`PyObject_CallObject`.  This function has two arguments, both pointers to
 arbitrary Python objects: the Python function, and the argument list.  The
 argument list must always be a tuple object, whose length is the number of
 arguments.  To call the Python function with no arguments, pass in NULL, or
@@ -484,16 +484,16 @@
    ...
    /* Time to call the callback */
    arglist = Py_BuildValue("(i)", arg);
-   result = PyEval_CallObject(my_callback, arglist);
+   result = PyObject_CallObject(my_callback, arglist);
    Py_DECREF(arglist);
 
-:cfunc:`PyEval_CallObject` returns a Python object pointer: this is the return
-value of the Python function.  :cfunc:`PyEval_CallObject` is
+:cfunc:`PyObject_CallObject` returns a Python object pointer: this is the return
+value of the Python function.  :cfunc:`PyObject_CallObject` is
 "reference-count-neutral" with respect to its arguments.  In the example a new
 tuple was created to serve as the argument list, which is :cfunc:`Py_DECREF`\
 -ed immediately after the call.
 
-The return value of :cfunc:`PyEval_CallObject` is "new": either it is a brand
+The return value of :cfunc:`PyObject_CallObject` is "new": either it is a brand
 new object, or it is an existing object whose reference count has been
 incremented.  So, unless you want to save it in a global variable, you should
 somehow :cfunc:`Py_DECREF` the result, even (especially!) if you are not
@@ -501,7 +501,7 @@
 
 Before you do this, however, it is important to check that the return value
 isn't *NULL*.  If it is, the Python function terminated by raising an exception.
-If the C code that called :cfunc:`PyEval_CallObject` is called from Python, it
+If the C code that called :cfunc:`PyObject_CallObject` is called from Python, it
 should now return an error indication to its Python caller, so the interpreter
 can print a stack trace, or the calling Python code can handle the exception.
 If this is not possible or desirable, the exception should be cleared by calling
@@ -513,7 +513,7 @@
    Py_DECREF(result);
 
 Depending on the desired interface to the Python callback function, you may also
-have to provide an argument list to :cfunc:`PyEval_CallObject`.  In some cases
+have to provide an argument list to :cfunc:`PyObject_CallObject`.  In some cases
 the argument list is also provided by the Python program, through the same
 interface that specified the callback function.  It can then be saved and used
 in the same manner as the function object.  In other cases, you may have to
@@ -524,7 +524,7 @@
    PyObject *arglist;
    ...
    arglist = Py_BuildValue("(l)", eventcode);
-   result = PyEval_CallObject(my_callback, arglist);
+   result = PyObject_CallObject(my_callback, arglist);
    Py_DECREF(arglist);
    if (result == NULL)
        return NULL; /* Pass error back */
@@ -536,19 +536,20 @@
 :cfunc:`Py_BuildValue` may run out of memory, and this should be checked.
 
 You may also call a function with keyword arguments by using
-:cfunc:`PyEval_CallObjectWithKeywords`.  As in the above example, we use
-:cfunc:`Py_BuildValue` to construct the dictionary. ::
+:cfunc:`PyObject_Call`, which supports arguments and keyword arguments.  As in
+the above example, we use :cfunc:`Py_BuildValue` to construct the dictionary. ::
 
    PyObject *dict;
    ...
    dict = Py_BuildValue("{s:i}", "name", val);
-   result = PyEval_CallObjectWithKeywords(my_callback, NULL, dict);
+   result = PyObject_Call(my_callback, NULL, dict);
    Py_DECREF(dict);
    if (result == NULL)
        return NULL; /* Pass error back */
    /* Here maybe use the result */
    Py_DECREF(result);
 
+
 .. _parsetuple:
 
 Extracting Parameters in Extension Functions