Victor Stinner
9550ef30e3
Issue #9566 : Fix compilater warnings on Windows 64-bit
13 years ago
Richard Oudkerk
25296ce5de
Use PY_FORMAT_SIZE_T because Visual Studio does not understand %zd format.
13 years ago
Victor Stinner
84bb1cf994
Fix compilater warnings on Windows 64-bit
13 years ago
Antoine Pitrou
7056cb2867
Issue #17170 : speed up PyArg_ParseTuple[AndKeywords] a bit.
13 years ago
Antoine Pitrou
4de7457009
Issue #17173 : Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter.
I've left a couple of them in: zlib (third-party lib), getaddrinfo.c
(doesn't include Python.h, and probably obsolete), _sre.c (legitimate
use for the re.LOCALE flag).
13 years ago
Christian Heimes
48d8d21438
Added missing va_end in error branch of PyArg_UnpackTuple(). CID 486641
13 years ago
Christian Heimes
d8edcb6505
Added missing va_end in error branch of PyArg_UnpackTuple(). CID 486641
13 years ago
Victor Stinner
a1b0c9fc4d
PyArg_Parse*("U"): ensure that the Unicode string is ready
14 years ago
Larry Hastings
a34790104c
Issue #14746 : Remove redundant paragraphs from skipitem() in Python/getargs.c.
14 years ago
Larry Hastings
d9e4a414d7
Issue #14749 : Add support for 'Z' to skipitem() in Python/getargs.c.
14 years ago
Larry Hastings
10ba07a39e
Issue #14705 : Added support for the new 'p' format unit to skipitem().
14 years ago
Larry Hastings
faf91e75ab
Issue #14705 : Add 'p' format character to PyArg_ParseTuple* for bool support.
14 years ago
Kristján Valur Jónsson
50b6778bda
Issue #10538 . Put a reference to the source object in the Py_buffer when
converting the old buffer for PyArgs_ParseTuple with *s
14 years ago
Larry Hastings
83a9f48699
Issue #14328 : Add keyword-only parameters to PyArg_ParseTupleAndKeywords.
They're optional-only for now (unlike in pure Python) but that's all
I needed. The syntax can easily be relaxed if we want to support
required keyword-only arguments for extension types in the future.
14 years ago
Benjamin Peterson
01feaecbfa
plug memory leak ( closes #14325 )
14 years ago
Benjamin Peterson
eb74918685
kill capsule names that we don't need anymore
14 years ago
Benjamin Peterson
f7c132158d
use memory macros
14 years ago
Benjamin Peterson
7ed67270a8
check result of PyMem_New
14 years ago
Jean-Paul Calderone
c961b4abaa
Issue #14325 : Stop using python lists, capsules, and the garbage collector to deal with PyArg_Parse* cleanup.
14 years ago
Victor Stinner
9d663d0788
convertsimple(): "str without bytes" => "str without characters"
14 years ago
Victor Stinner
beac78bb24
Use PyUnicode_AsUnicodeAndSize() instead of PyUnicode_GET_SIZE()
14 years ago
Victor Stinner
e1335c711c
Fix usage og PyUnicode_READY()
14 years ago
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
14 years ago
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
15 years ago
Victor Stinner
0a92d1849e
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 bytes).
15 years ago
Victor Stinner
645b9f67ae
Issue #8651 : Fix "z#" format of PyArg_Parse*() function: the size was not
written if PY_SSIZE_T_CLEAN is defined.
15 years ago
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.
15 years ago
Victor Stinner
451385d8f8
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 bytes).
15 years ago
Victor Stinner
f3fd733f92
Remove useless argument of _PyUnicode_AsDefaultEncodedString()
15 years ago
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
15 years ago
Victor Stinner
6ab8e8298e
Issue #8992 : convertsimple() doesn't need to fill msgbuf if an error occurred
Return msgbug on error is enough.
15 years ago
Victor Stinner
a093d0d6a9
Issue #8992 : Simplify addcleanup() API
Don't need to handle unknown destructor anymore.
15 years ago
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).
15 years ago
Benjamin Peterson
f609654b0e
handle dict subclasses gracefully in PyArg_ValidateKeywordArguments
15 years ago
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.
16 years ago
Victor Stinner
8182b717db
Issue #8991 : convertbuffer() rejects discontigious buffers
16 years ago
Victor Stinner
25e8ec4724
Issue #8850 : Remove "w" and "w#" formats from PyArg_Parse*() functions, use
"w*" format instead. Add tests for "w*" format.
16 years ago
Victor Stinner
174799912f
Issue #8926 : getargs.c: release the buffer on error
- "t#" format: don't get the buffer if the object is not a pinned buffer
- getbuffer(): release the buffer on error
(Commit based on r82206 from py3k)
16 years ago
Victor Stinner
21e09487ac
getbuffer(): release the buffer on error (if the buffer is not contiguous)
16 years ago
Victor Stinner
3c9e6e9375
PyArg_Parse*() functions: factorize code for s/z and u/Z formats
16 years ago
Victor Stinner
4aae1ebab2
Issue #8949 : "z" format of PyArg_Parse*() functions doesn't accept bytes
objects, as described in the documentation.
16 years ago
Victor Stinner
510b6227a7
getargs.c: remove last reference to "t#" format
"t#" format was removed from convertitem() (convertsimple) but not skipitem().
16 years ago
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.
16 years ago
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.
16 years ago
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.
16 years ago
Victor Stinner
55b002f096
Merged revisions 81849 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r81849 | victor.stinner | 2010-06-08 23:45:51 +0200 (mar., 08 juin 2010) | 7 lines
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.
........
16 years ago
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.
16 years ago
Victor Stinner
2872e5b1f8
convertsimple(): call PyErr_NoMemory() on PyMem_NEW() failure
Raise a more revelant error (MemoryError instead of TypeError)
16 years ago
Victor Stinner
5cb6239f00
Simplify getbuffer(): convertbuffer() fails anyway if bf_getbuffer is NULL
16 years ago
Victor Stinner
43fb0097f3
Remove dead code
16 years ago