[Python-checkins] CVS: python/dist/src/Doc/ext embedding.tex,1.2,1.3 extending.tex,1.4,1.5 newtypes.tex,1.4,1.5
Fred L. Drake
fdrake@users.sourceforge.net
Fri, 16 Nov 2001 22:50:44 -0800
Update of /cvsroot/python/python/dist/src/Doc/ext
In directory usw-pr-cvs1:/tmp/cvs-serv30212
Modified Files:
embedding.tex extending.tex newtypes.tex
Log Message:
Exhibit good form in C code: always provide docstrings in method tables, and
always fill in all slots of table entries.
Fixed a few minor markup errors.
Index: embedding.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/embedding.tex,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** embedding.tex 2001/09/06 16:17:24 1.2
--- embedding.tex 2001/11/17 06:50:42 1.3
***************
*** 232,238 ****
}
! static PyMethodDef EmbMethods[]={
! {"numargs", emb_numargs, METH_VARARGS},
! {NULL, NULL}
};
\end{verbatim}
--- 232,239 ----
}
! static PyMethodDef EmbMethods[] = {
! {"numargs", emb_numargs, METH_VARARGS,
! "Return the number of arguments received by the process."},
! {NULL, NULL, 0, NULL}
};
\end{verbatim}
Index: extending.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/extending.tex,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** extending.tex 2001/10/20 04:19:50 1.4
--- extending.tex 2001/11/17 06:50:42 1.5
***************
*** 216,220 ****
\begin{verbatim}
void
! initspam()
{
PyObject *m, *d;
--- 216,220 ----
\begin{verbatim}
void
! initspam(void)
{
PyObject *m, *d;
***************
*** 309,315 ****
static PyMethodDef SpamMethods[] = {
...
! {"system", spam_system, METH_VARARGS},
...
! {NULL, NULL} /* Sentinel */
};
\end{verbatim}
--- 309,316 ----
static PyMethodDef SpamMethods[] = {
...
! {"system", spam_system, METH_VARARGS,
! "Execute a shell command."},
...
! {NULL, NULL, 0, NULL} /* Sentinel */
};
\end{verbatim}
***************
*** 341,345 ****
\begin{verbatim}
void
! initspam()
{
(void) Py_InitModule("spam", SpamMethods);
--- 342,346 ----
\begin{verbatim}
void
! initspam(void)
{
(void) Py_InitModule("spam", SpamMethods);
***************
*** 993,1002 ****
* three.
*/
! {"parrot", (PyCFunction)keywdarg_parrot, METH_VARARGS|METH_KEYWORDS},
! {NULL, NULL} /* sentinel */
};
void
! initkeywdarg()
{
/* Create the module and add the functions */
--- 994,1004 ----
* three.
*/
! {"parrot", (PyCFunction)keywdarg_parrot, METH_VARARGS|METH_KEYWORDS,
! "Print a lovely skit to standard output."},
! {NULL, NULL, 0, NULL} /* sentinel */
};
void
! initkeywdarg(void)
{
/* Create the module and add the functions */
***************
*** 1591,1595 ****
\begin{verbatim}
void
! initspam()
{
PyObject *m;
--- 1593,1597 ----
\begin{verbatim}
void
! initspam(void)
{
PyObject *m;
***************
*** 1615,1620 ****
\end{verbatim}
! Note that \code{PySpam_API} is declared \code{static}; otherwise
! the pointer array would disappear when \code{initspam} terminates!
The bulk of the work is in the header file \file{spammodule.h},
--- 1617,1622 ----
\end{verbatim}
! Note that \code{PySpam_API} is declared \keyword{static}; otherwise
! the pointer array would disappear when \function{initspam()} terminates!
The bulk of the work is in the header file \file{spammodule.h},
***************
*** 1680,1684 ****
\begin{verbatim}
void
! initclient()
{
PyObject *m;
--- 1682,1686 ----
\begin{verbatim}
void
! initclient(void)
{
PyObject *m;
Index: newtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/newtypes.tex,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** newtypes.tex 2001/10/16 20:32:05 1.4
--- newtypes.tex 2001/11/17 06:50:42 1.5
***************
*** 78,83 ****
static PyMethodDef noddy_methods[] = {
! { "new_noddy", noddy_new_noddy, METH_VARARGS },
! {NULL, NULL}
};
--- 78,84 ----
static PyMethodDef noddy_methods[] = {
! {"new_noddy", noddy_new_noddy, METH_VARARGS,
! "Create a new Noddy object."},
! {NULL, NULL, 0, NULL}
};
***************
*** 582,588 ****
\begin{verbatim}
static PyMethodDef newdatatype_methods[] = {
! {"getSize", (PyCFunction)newdatatype_getSize, METH_VARARGS},
! {"setSize", (PyCFunction)newdatatype_setSize, METH_VARARGS},
! {NULL, NULL} /* sentinel */
};
--- 583,591 ----
\begin{verbatim}
static PyMethodDef newdatatype_methods[] = {
! {"getSize", (PyCFunction)newdatatype_getSize, METH_VARARGS,
! "Return the current size."},
! {"setSize", (PyCFunction)newdatatype_setSize, METH_VARARGS,
! "Set the size."},
! {NULL, NULL, 0, NULL} /* sentinel */
};