Eli Bendersky
906b88fb2a
Issue #12380 : PyArg_ParseTuple now accepts a bytearray for the 'c' format.
...
As a side effect, this now allows the rjust, ljust and center methods of
bytes and bytearray to accept a bytearray argument.
Patch by Petri Lehtinen
2011-07-29 07:05:08 +03:00
Victor Stinner
6ced7c4333
Issue #10833 : Use PyErr_Format() and PyUnicode_FromFormat() instead of
...
PyOS_snprintf() to avoid temporary buffer allocated on the stack and a
conversion from bytes to Unicode.
2011-03-21 18:15:42 +01:00
Victor Stinner
f3fd733f92
Remove useless argument of _PyUnicode_AsDefaultEncodedString()
2011-03-02 01:03:11 +00:00
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
2011-02-22 20:15:44 +00:00
Victor Stinner
6ab8e8298e
Issue #8992 : convertsimple() doesn't need to fill msgbuf if an error occurred
...
Return msgbug on error is enough.
2011-01-04 11:16:49 +00:00
Victor Stinner
a093d0d6a9
Issue #8992 : Simplify addcleanup() API
...
Don't need to handle unknown destructor anymore.
2011-01-04 11:16:48 +00:00
Victor Stinner
b3c9e073fc
Issue #8651 : PyArg_Parse*() functions raise an OverflowError if the file
...
doesn't have PY_SSIZE_T_CLEAN define and the size doesn't fit in an int
(length bigger than 2^31-1).
2011-01-04 02:07:34 +00:00
Benjamin Peterson
f609654b0e
handle dict subclasses gracefully in PyArg_ValidateKeywordArguments
2010-11-17 22:33:12 +00:00
Alexander Belopolsky
f0f45142d5
Issue #2443 : Added a new macro, Py_VA_COPY, which is equivalent to C99
...
va_copy, but available on all python platforms. Untabified a few
unrelated files.
2010-08-11 17:31:17 +00:00
Victor Stinner
8182b717db
Issue #8991 : convertbuffer() rejects discontigious buffers
2010-07-28 00:40:58 +00:00
Victor Stinner
25e8ec4724
Issue #8850 : Remove "w" and "w#" formats from PyArg_Parse*() functions, use
...
"w*" format instead. Add tests for "w*" format.
2010-06-25 00:02:38 +00:00
Victor Stinner
21e09487ac
getbuffer(): release the buffer on error (if the buffer is not contiguous)
2010-06-24 22:57:10 +00:00
Victor Stinner
3c9e6e9375
PyArg_Parse*() functions: factorize code for s/z and u/Z formats
2010-06-24 22:31:12 +00:00
Victor Stinner
4aae1ebab2
Issue #8949 : "z" format of PyArg_Parse*() functions doesn't accept bytes
...
objects, as described in the documentation.
2010-06-24 22:08:25 +00:00
Victor Stinner
510b6227a7
getargs.c: remove last reference to "t#" format
...
"t#" format was removed from convertitem() (convertsimple) but not skipitem().
2010-06-13 20:31:26 +00:00
Victor Stinner
06e49dd029
Issue #8592 : PyArg_Parse*() functions raise a TypeError for "y", "u" and "Z"
...
formats if the string contains a null byte/character. Write unit tests for
string formats.
2010-06-13 18:21:50 +00:00
Mark Dickinson
c73013127b
Issue #8950 : Make PyArg_Parse* with 'L' code raise for float inputs,
...
instead of warning. This makes it consistent with the other integer
codes.
2010-06-10 16:05:10 +00:00
Victor Stinner
3dcb5acdb0
Issue #8838 , #8339 : Remove codecs.charbuffer_encode() and "t#" parsing format
...
Remove last references to the "char buffer" of the buffer protocol from
Python3.
2010-06-08 22:54:19 +00:00
Victor Stinner
5216e6d598
PyArg_Parse*("Z#") raises an error for unknown type
...
instead of ignoring the error and leave the pointer to the string and the size
unchanged (not initialized).
Fix also the type in the error message of "Z", "Z#" and "Y" formats.
2010-06-08 21:45:51 +00:00
Victor Stinner
2872e5b1f8
convertsimple(): call PyErr_NoMemory() on PyMem_NEW() failure
...
Raise a more revelant error (MemoryError instead of TypeError)
2010-06-06 20:38:02 +00:00
Victor Stinner
5cb6239f00
Simplify getbuffer(): convertbuffer() fails anyway if bf_getbuffer is NULL
2010-06-06 20:27:51 +00:00
Victor Stinner
43fb0097f3
Remove dead code
2010-05-29 00:13:06 +00:00
Victor Stinner
33109a142b
Issue #8837 : Remove "O?" format of PyArg_Parse*() functions. The format is no
...
used anymore and it was never documented.
2010-05-28 21:55:10 +00:00
Victor Stinner
93b5513cf1
Issue #6697 : Fix a crash if a keyword contains a surrogate
2010-05-19 00:54:06 +00:00
Antoine Pitrou
f95a1b3c53
Recorded merge of revisions 81029 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
2010-05-09 15:52:27 +00:00