[Python-checkins] python/dist/src/Doc/api concrete.tex,1.26,1.27

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sun Oct 12 14:24:37 EDT 2003


Update of /cvsroot/python/python/dist/src/Doc/api
In directory sc8-pr-cvs1:/tmp/cvs-serv25726/Doc/api

Modified Files:
	concrete.tex 
Log Message:
Extended tuple's C API to include a new function, PyTuple_Pack() that is
useful for rapidly building argument tuples without having to invoke the
more sophisticated machinery of Py_BuildValue().



Index: concrete.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/concrete.tex,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** concrete.tex	23 Aug 2003 03:38:11 -0000	1.26
--- concrete.tex	12 Oct 2003 18:24:34 -0000	1.27
***************
*** 974,978 ****
  names. This variable should be treated as read-only: On some systems,
  it will be a pointer to a static string, on others, it will change at
! run-time, e.g. when the application invokes setlocale.
  
  Error handling is set by errors which may also be set to \NULL{}
--- 974,978 ----
  names. This variable should be treated as read-only: On some systems,
  it will be a pointer to a static string, on others, it will change at
! run-time (such as when the application invokes setlocale).
  
  Error handling is set by errors which may also be set to \NULL{}
***************
*** 1583,1586 ****
--- 1583,1594 ----
  \begin{cfuncdesc}{PyObject*}{PyTuple_New}{int len}
    Return a new tuple object of size \var{len}, or \NULL{} on failure.
+ \end{cfuncdesc}
+ 
+ \begin{cfuncdesc}{PyObject*}{PyTuple_Pack}{int n, \moreargs}
+   Return a new tuple object of size \var{n}, or \NULL{} on failure.
+   The tuple values are initialized to the subsequent \var{n} C arguments
+   pointing to Python objects.  \samp{PyTuple_Pack(2, \var{a}, \var{b})}
+   is equivalent to \samp{Py_BuildValue("(OO)", \var{a}, \var{b})}.
+   \versionadded{2.4}			 
  \end{cfuncdesc}
  





More information about the Python-checkins mailing list