python/dist/src/Doc/ext extending.tex,1.29,1.30

Update of /cvsroot/python/python/dist/src/Doc/ext In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12197 Modified Files: extending.tex Log Message: Changed applicable use of ``char *`` declarations that are passed into PyArg_ParseTuple() to ``const char *`` to match the recommendation made in section 1.3 and to support better coding habits. Section 1.8 ("Keyword Parameters for Extension Functions") and it's coding example were not touched since it is stems from an accredited source and thus did not want to step on anyone's toes. Index: extending.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/extending.tex,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** extending.tex 27 Jun 2004 04:28:00 -0000 1.29 --- extending.tex 29 Jun 2004 03:48:23 -0000 1.30 *************** *** 71,75 **** spam_system(PyObject *self, PyObject *args) { ! char *command; int sts; --- 71,75 ---- spam_system(PyObject *self, PyObject *args) { ! const char *command; int sts; *************** *** 635,639 **** int i, j; long k, l; ! char *s; int size; --- 635,639 ---- int i, j; long k, l; ! const char *s; int size; *************** *** 660,665 **** \begin{verbatim} { ! char *file; ! char *mode = "r"; int bufsize = 0; ok = PyArg_ParseTuple(args, "s|si", &file, &mode, &bufsize); --- 660,665 ---- \begin{verbatim} { ! const char *file; ! const char *mode = "r"; int bufsize = 0; ok = PyArg_ParseTuple(args, "s|si", &file, &mode, &bufsize); *************** *** 1229,1233 **** \begin{verbatim} static int ! PySpam_System(char *command) { return system(command); --- 1229,1233 ---- \begin{verbatim} static int ! PySpam_System(const char *command) { return system(command); *************** *** 1241,1245 **** spam_system(PyObject *self, PyObject *args) { ! char *command; int sts; --- 1241,1245 ---- spam_system(PyObject *self, PyObject *args) { ! const char *command; int sts;
participants (1)
-
bcannon@users.sourceforge.net