[Python-checkins] python/dist/src/Doc/api utilities.tex,1.14,1.15

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Thu Jul 1 16:55:45 EDT 2004


Update of /cvsroot/python/python/dist/src/Doc/api
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16682/Doc/api

Modified Files:
	utilities.tex 
Log Message:
Change signatures for arguments to "s" and friends to be the proper ``const
char *`` instead of just ``char *``.  Also added the mentioning of "const" in
some places where it was left out even when the signature already stated the
fact.

Closes bug #980925.


Index: utilities.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/utilities.tex,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** utilities.tex	27 Jun 2004 16:51:45 -0000	1.14
--- utilities.tex	1 Jul 2004 20:55:42 -0000	1.15
***************
*** 385,389 ****
  
  \begin{description}
!   \item[\samp{s} (string or Unicode object) {[char *]}]
    Convert a Python string or Unicode object to a C pointer to a
    character string.  You must not provide storage for the string
--- 385,389 ----
  
  \begin{description}
!   \item[\samp{s} (string or Unicode object) {[const char *]}]
    Convert a Python string or Unicode object to a C pointer to a
    character string.  You must not provide storage for the string
***************
*** 397,401 ****
  
    \item[\samp{s\#} (string, Unicode or any read buffer compatible object)
!   {[char *, int]}]
    This variant on \samp{s} stores into two C variables, the first one
    a pointer to a character string, the second one its length.  In this
--- 397,401 ----
  
    \item[\samp{s\#} (string, Unicode or any read buffer compatible object)
!   {[const char *, int]}]
    This variant on \samp{s} stores into two C variables, the first one
    a pointer to a character string, the second one its length.  In this
***************
*** 406,415 ****
    representation.
  
!   \item[\samp{z} (string or \code{None}) {[char *]}]
    Like \samp{s}, but the Python object may also be \code{None}, in
    which case the C pointer is set to \NULL.
  
    \item[\samp{z\#} (string or \code{None} or any read buffer
!   compatible object) {[char *, int]}]
    This is to \samp{s\#} as \samp{z} is to \samp{s}.
  
--- 406,415 ----
    representation.
  
!   \item[\samp{z} (string or \code{None}) {[const char *]}]
    Like \samp{s}, but the Python object may also be \code{None}, in
    which case the C pointer is set to \NULL.
  
    \item[\samp{z\#} (string or \code{None} or any read buffer
!   compatible object) {[const char *, int]}]
    This is to \samp{s\#} as \samp{z} is to \samp{s}.
  
***************
*** 434,438 ****
  
    This format requires two arguments.  The first is only used as
!   input, and must be a \ctype{char*} which points to the name of an
    encoding as a NUL-terminated string, or \NULL, in which case the
    default encoding is used.  An exception is raised if the named
--- 434,438 ----
  
    This format requires two arguments.  The first is only used as
!   input, and must be a \ctype{const char*} which points to the name of an
    encoding as a NUL-terminated string, or \NULL, in which case the
    default encoding is used.  An exception is raised if the named
***************
*** 462,466 ****
  
    It requires three arguments.  The first is only used as input, and
!   must be a \ctype{char*} which points to the name of an encoding as a
    NUL-terminated string, or \NULL, in which case the default encoding
    is used.  An exception is raised if the named encoding is not known
--- 462,466 ----
  
    It requires three arguments.  The first is only used as input, and
!   must be a \ctype{const char*} which points to the name of an encoding as a
    NUL-terminated string, or \NULL, in which case the default encoding
    is used.  An exception is raised if the named encoding is not known




More information about the Python-checkins mailing list