[Python-checkins] python/dist/src/Doc/ext extending.tex,1.20,1.21
fdrake@users.sourceforge.net
fdrake@users.sourceforge.net
Fri, 21 Jun 2002 18:42:02 -0700
Update of /cvsroot/python/python/dist/src/Doc/ext
In directory usw-pr-cvs1:/tmp/cvs-serv7160/Doc/ext
Modified Files:
extending.tex
Log Message:
Convert the example C code to ANSI rather than K&R.
This matches the Python C style guide (PEP 7).
Closes SF patch #571489.
Index: extending.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/extending.tex,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** extending.tex 16 May 2002 13:48:14 -0000 1.20
--- extending.tex 22 Jun 2002 01:42:00 -0000 1.21
***************
*** 66,72 ****
\begin{verbatim}
static PyObject *
! spam_system(self, args)
! PyObject *self;
! PyObject *args;
{
char *command;
--- 66,70 ----
\begin{verbatim}
static PyObject *
! spam_system(PyObject *self, PyObject *args)
{
char *command;
***************
*** 372,376 ****
\begin{verbatim}
! int main(int argc, char **argv)
{
/* Pass argv[0] to the Python interpreter */
--- 370,375 ----
\begin{verbatim}
! int
! main(int argc, char *argv[])
{
/* Pass argv[0] to the Python interpreter */
***************
*** 477,482 ****
static PyObject *
! my_set_callback(dummy, args)
! PyObject *dummy, *args;
{
PyObject *result = NULL;
--- 476,480 ----
static PyObject *
! my_set_callback(PyObject *dummy, PyObject *args)
{
PyObject *result = NULL;
***************
*** 697,701 ****
\begin{verbatim}
int PyArg_ParseTupleAndKeywords(PyObject *arg, PyObject *kwdict,
! char *format, char **kwlist, ...);
\end{verbatim}
--- 695,699 ----
\begin{verbatim}
int PyArg_ParseTupleAndKeywords(PyObject *arg, PyObject *kwdict,
! char *format, char *kwlist[], ...);
\end{verbatim}
***************
*** 721,728 ****
static PyObject *
! keywdarg_parrot(self, args, keywds)
! PyObject *self;
! PyObject *args;
! PyObject *keywds;
{
int voltage;
--- 719,723 ----
static PyObject *
! keywdarg_parrot(PyObject *self, PyObject *args, PyObject *keywds)
{
int voltage;
***************
*** 1019,1023 ****
\begin{verbatim}
! bug(PyObject *list) {
PyObject *item = PyList_GetItem(list, 0);
--- 1014,1020 ----
\begin{verbatim}
! void
! bug(PyObject *list)
! {
PyObject *item = PyList_GetItem(list, 0);
***************
*** 1053,1057 ****
\begin{verbatim}
! no_bug(PyObject *list) {
PyObject *item = PyList_GetItem(list, 0);
--- 1050,1056 ----
\begin{verbatim}
! void
! no_bug(PyObject *list)
! {
PyObject *item = PyList_GetItem(list, 0);
***************
*** 1079,1083 ****
\begin{verbatim}
! bug(PyObject *list) {
PyObject *item = PyList_GetItem(list, 0);
Py_BEGIN_ALLOW_THREADS
--- 1078,1084 ----
\begin{verbatim}
! void
! bug(PyObject *list)
! {
PyObject *item = PyList_GetItem(list, 0);
Py_BEGIN_ALLOW_THREADS
***************
*** 1222,1227 ****
\begin{verbatim}
static int
! PySpam_System(command)
! char *command;
{
return system(command);
--- 1223,1227 ----
\begin{verbatim}
static int
! PySpam_System(char *command)
{
return system(command);
***************
*** 1233,1239 ****
\begin{verbatim}
static PyObject *
! spam_system(self, args)
! PyObject *self;
! PyObject *args;
{
char *command;
--- 1233,1237 ----
\begin{verbatim}
static PyObject *
! spam_system(PyObject *self, PyObject *args)
{
char *command;