~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Doc/c-api/arg.rst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
   :file:`Python.h`.  If the macro is defined, length is a :ctype:`Py_ssize_t`
47
47
   rather than an int.
48
48
 
49
 
``s*`` (string, Unicode, or any buffer compatible object) [Py_buffer \*]
 
49
``s*`` (string, Unicode, or any buffer compatible object) [Py_buffer]
50
50
   Similar to ``s#``, this code fills a Py_buffer structure provided by the
51
51
   caller.  The buffer gets locked, so that the caller can subsequently use
52
52
   the buffer even inside a ``Py_BEGIN_ALLOW_THREADS`` block; the caller is
62
62
``z#`` (string or ``None`` or any read buffer compatible object) [const char \*, int]
63
63
   This is to ``s#`` as ``z`` is to ``s``.
64
64
 
65
 
``z*`` (string or ``None`` or any buffer compatible object) [Py_buffer*]
 
65
``z*`` (string or ``None`` or any buffer compatible object) [Py_buffer]
66
66
   This is to ``s*`` as ``z`` is to ``s``.
67
67
 
68
68
   .. versionadded:: 2.6
136
136
   In both cases, *\*buffer_length* is set to the length of the encoded data
137
137
   without the trailing NUL byte.
138
138
 
139
 
``et#`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer]
 
139
``et#`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer, int \*buffer_length]
140
140
   Same as ``es#`` except that string objects are passed through without
141
141
   recoding them. Instead, the implementation assumes that the string object
142
142
   uses the encoding passed in as parameter.
266
266
   buffer.  Only single-segment buffer objects are accepted; :exc:`TypeError`
267
267
   is raised for all others.
268
268
 
269
 
``w*`` (read-write byte-oriented buffer) [Py_buffer \*]
 
269
``w*`` (read-write byte-oriented buffer) [Py_buffer]
270
270
   This is to ``w`` what ``s*`` is to ``s``.
271
271
 
272
272
   .. versionadded:: 2.6