summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-10-25 15:53:44 (GMT)
committerFred Drake <fdrake@acm.org>2001-10-25 15:53:44 (GMT)
commit847c51a1812962efe525a987e6ddf15563206e68 (patch)
treeb9bdc61d9682330a3114f7d005c3d1eb46fa9fd1 /Doc
parentaf876d77e0347a95170a042a3c16e43b99052682 (diff)
downloadcpython-847c51a1812962efe525a987e6ddf15563206e68.zip
cpython-847c51a1812962efe525a987e6ddf15563206e68.tar.gz
cpython-847c51a1812962efe525a987e6ddf15563206e68.tar.bz2
Slightly better conformance to the Python C style guide.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/api/intro.tex12
1 files changed, 8 insertions, 4 deletions
diff --git a/Doc/api/intro.tex b/Doc/api/intro.tex
index d148ba8..926ae74 100644
--- a/Doc/api/intro.tex
+++ b/Doc/api/intro.tex
@@ -250,7 +250,8 @@ sets all items of a list (actually, any mutable sequence) to a given
item:
\begin{verbatim}
-int set_all(PyObject *target, PyObject *item)
+int
+set_all(PyObject *target, PyObject *item)
{
int i, n;
@@ -293,7 +294,8 @@ sum of the items in a list of integers; once using
\cfunction{PySequence_GetItem()}\ttindex{PySequence_GetItem()}.
\begin{verbatim}
-long sum_list(PyObject *list)
+long
+sum_list(PyObject *list)
{
int i, n;
long total = 0;
@@ -313,7 +315,8 @@ long sum_list(PyObject *list)
\ttindex{sum_list()}
\begin{verbatim}
-long sum_sequence(PyObject *sequence)
+long
+sum_sequence(PyObject *sequence)
{
int i, n;
long total = 0;
@@ -432,7 +435,8 @@ def incr_item(dict, key):
Here is the corresponding C code, in all its glory:
\begin{verbatim}
-int incr_item(PyObject *dict, PyObject *key)
+int
+incr_item(PyObject *dict, PyObject *key)
{
/* Objects all initialized to NULL for Py_XDECREF */
PyObject *item = NULL, *const_one = NULL, *incremented_item = NULL;