Mercurial > cpython-lru_cache-weakref
diff Doc/api/intro.tex @ 20665:3ce03e2f01ef legacy-trunk
Slightly better conformance to the Python C style guide.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Thu, 25 Oct 2001 15:53:44 +0000 |
| parents | 946bebd00132 |
| children | bc02c3b09626 |
line wrap: on
line diff
--- a/Doc/api/intro.tex Thu Oct 25 15:14:57 2001 +0000 +++ b/Doc/api/intro.tex Thu Oct 25 15:53:44 2001 +0000 @@ -250,7 +250,8 @@ item: \begin{verbatim} -int set_all(PyObject *target, PyObject *item) +int +set_all(PyObject *target, PyObject *item) { int i, n; @@ -293,7 +294,8 @@ \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 @@ \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 @@ 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;
