[Bug #567607] Suggest METH_NOARGS to replace PyArg_NoArgs

This commit is contained in:
Andrew M. Kuchling 2002-07-11 19:27:46 +00:00
parent c62b95e550
commit 7845e7c726
1 changed files with 9 additions and 5 deletions

View File

@ -653,9 +653,13 @@ when running Python's \file{configure} script. (Contributed by Ondrej
Palkovsky.) Palkovsky.)
\item The \cfunction{PyArg_NoArgs()} macro is now deprecated, and code \item The \cfunction{PyArg_NoArgs()} macro is now deprecated, and code
that that uses it should be changed. For Python 2.2 and later, the method
uses it should be changed to use \code{PyArg_ParseTuple(args, "")} definition table can specify the
instead. \constant{METH_NOARGS} flag, signalling that there are no arguments, and
the argument checking can then be removed. If compatibility with
pre-2.2 versions of Python is important, the code could use
\code{PyArg_ParseTuple(args, "")} instead, but this will be slower
than using \constant{METH_NOARGS}.
\item A new function, \cfunction{PyObject_DelItemString(\var{mapping}, \item A new function, \cfunction{PyObject_DelItemString(\var{mapping},
char *\var{key})} was added char *\var{key})} was added
@ -721,7 +725,7 @@ as well as \UNIX.
The author would like to thank the following people for offering The author would like to thank the following people for offering
suggestions, corrections and assistance with various drafts of this suggestions, corrections and assistance with various drafts of this
article: Michael Chermside, Scott David Daniels, Fred~L. Drake, Jr., article: Michael Chermside, Scott David Daniels, Fred~L. Drake, Jr.,
Michael Hudson, Detlef Lannert, Andrew MacIntyre, Gustavo Niemeyer, Michael Hudson, Detlef Lannert, Martin von L\"owis, Andrew MacIntyre,
Neal Norwitz. Gustavo Niemeyer, Neal Norwitz.
\end{document} \end{document}