From: A.M. K. <aku...@us...> - 2001-08-29 01:16:57
|
Update of /cvsroot/py-howto/pyhowto In directory usw-pr-cvs1:/tmp/cvs-serv15768 Modified Files: python-22.tex Log Message: Add METH_O and METH_NOARGS change Rewrite snprintf() item a bit Bump version number Index: python-22.tex =================================================================== RCS file: /cvsroot/py-howto/pyhowto/python-22.tex,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** python-22.tex 2001/08/15 15:55:48 1.22 --- python-22.tex 2001/08/29 01:16:54 1.23 *************** *** 4,8 **** \title{What's New in Python 2.2} ! \release{0.04} \author{A.M. Kuchling} \authoraddress{\email{aku...@me...}} --- 4,8 ---- \title{What's New in Python 2.2} ! \release{0.05} \author{A.M. Kuchling} \authoraddress{\email{aku...@me...}} *************** *** 708,719 **** (Contributed by M.-A. Lemburg, and used for the MBCS support on Windows described in the previous section.) ! ! \item Two new wrapper functions, \cfunction{PyOS_snprintf()} and ! \cfunction{PyOS_vsnprintf()} were added. which provide a cross-platform ! implementations for the relatively new snprintf()/vsnprintf() C lib ! APIs. In contrast to the standard sprintf() and vsprintf() C lib ! APIs, these versions apply bounds checking on the used buffer which ! enhances protection against buffer overruns. ! (Contributed by M.-A. Lemburg.) \end{itemize} --- 708,729 ---- (Contributed by M.-A. Lemburg, and used for the MBCS support on Windows described in the previous section.) ! ! \item Two new flags \constant{METH_NOARGS} and \constant{METH_O} are ! available in method definition tables to simplify implementation of ! methods with no arguments or a single untyped argument. Calling ! such methods is more efficient than calling a corresponding method ! that uses \constant{METH_VARARGS}. ! Also, the old \constant{METH_OLDARGS} style of writing C methods is ! now officially deprecated. ! ! \item ! Two new wrapper functions, \cfunction{PyOS_snprintf()} and ! \cfunction{PyOS_vsnprintf()} were added. which provide a ! cross-platform implementations for the relatively new ! \cfunction{snprintf()} and \cfunction{vsnprintf()} C lib APIs. In ! contrast to the standard \cfunction{sprintf()} and ! \cfunction{vsprintf()} functions, the Python versions check the ! bounds of the buffer used to protect against buffer overruns. ! (Contributed by M.-A. Lemburg.) \end{itemize} |