Victor Stinner
4a58707a34
Add _PyUnicodeWriter_WriteASCIIString() function
2013-11-19 12:54:53 +01:00
Serhiy Storchaka
58cf607d13
Issue #12892 : The utf-16* and utf-32* codecs now reject (lone) surrogates.
...
The utf-16* and utf-32* encoders no longer allow surrogate code points
(U+D800-U+DFFF) to be encoded.
The utf-32* decoders no longer decode byte sequences that correspond to
surrogate code points.
The surrogatepass error handler now works with the utf-16* and utf-32* codecs.
Based on patches by Victor Stinner and Kang-Hao (Kenny) Lu.
2013-11-19 11:32:41 +02:00
Victor Stinner
cb29ec5f74
PY_FORMAT_SIZE_T should not be used with PyErr_Format(), PyErr_Format("%zd") is
...
portable
2013-11-18 02:05:31 +01:00
Victor Stinner
74387f5cac
Use Py_ssize_t type for sizes in getargs.c
...
Fix compiler warnings on Windows 64-bit
2013-11-18 01:21:12 +01:00
Victor Stinner
da062558db
Fix compiler warning (on Windows 64-bit): explicit cast Py_ssize_t to unsigned
...
char, n is in range [0; 255] (a tuple cannot have a negative length)
2013-11-16 00:13:29 +01:00
Victor Stinner
0c083461a5
Fix compiler warning in win32_urandom(): explicit cast to DWORD in
...
CryptGenRandom()
2013-11-15 23:26:25 +01:00
Victor Stinner
c31ebb60f9
(Merge 3.3) fileutils.c: use MAXPATHLEN instead of PATH_MAX
...
PATH_MAX is not declared on IRIX nor Windows.
2013-11-15 18:14:33 +01:00
Victor Stinner
b11d6cb711
fileutils.c: use MAXPATHLEN instead of PATH_MAX
...
PATH_MAX is not declared on IRIX nor Windows.
2013-11-15 18:14:11 +01:00
Victor Stinner
50e0157013
(Merge 3.3) sysmodule.c: fix sys_update_path(), use Py_ARRAY_LENGTH() to get
...
the size of the fullpath buffer, not PATH_MAX. fullpath is declared using
MAXPATHLEN or MAX_PATH depending on the OS, and PATH_MAX is not declared on
IRIX.
2013-11-15 17:35:31 +01:00
Victor Stinner
2384714819
sysmodule.c: fix sys_update_path(), use Py_ARRAY_LENGTH() to get the size of
...
the fullpath buffer, not PATH_MAX. fullpath is declared using MAXPATHLEN or
MAX_PATH depending on the OS, and PATH_MAX is not declared on IRIX.
2013-11-15 17:33:43 +01:00
Victor Stinner
b5a7a0aa3f
(Merge 3.3) pythonrun.c: fix Py_GetPythonHome(), use Py_ARRAY_LENGTH() to get
...
the size of the env_home buffer, not PATH_MAX+1. env_home is declared using
MAXPATHLEN+1, and PATH_MAX is not declared on IRIX.
2013-11-15 17:12:14 +01:00
Victor Stinner
2f5bbc6a12
pythonrun.c: fix Py_GetPythonHome(), use Py_ARRAY_LENGTH() to get the size of
...
the env_home buffer, not PATH_MAX+1. env_home is declared using MAXPATHLEN+1,
and PATH_MAX is not declared on IRIX.
2013-11-15 17:09:24 +01:00
Nick Coghlan
c4c2580d43
Close 19609: narrow scope of codec exc chaining
2013-11-15 21:47:37 +10:00
Victor Stinner
5eb4f59cd9
Issue #19437 : Fix init_builtin(), handle _PyImport_FindExtensionObject()
...
failure
2013-11-14 22:38:52 +01:00
Stefan Krah
49d0479357
Add unused third arg for the benefit of Valgrind.
2013-11-14 15:35:47 +01:00
Victor Stinner
c82729e44f
Issue #19437 : Fix fold_unaryops_on_constants() of the peephole optimizer, clear
...
the exception when PyList_Append() fails
2013-11-14 01:21:00 +01:00
Nick Coghlan
8b097b4ed7
Close #17828 : better handling of codec errors
...
- output type errors now redirect users to the type-neutral
convenience functions in the codecs module
- stateless errors that occur during encoding and decoding
will now be automatically wrapped in exceptions that give
the name of the codec involved
2013-11-13 23:49:21 +10:00
Victor Stinner
22af2599a9
Issue #19437 : Fix PyImport_ImportModuleLevelObject(), handle
...
PyUnicode_Substring() failure (ex: MemoryError)
2013-11-13 12:11:36 +01:00
Victor Stinner
3f36a5736b
Issue #19515 : Remove identifiers duplicated in the same file.
...
Patch written by Andrei Dorian Duma.
2013-11-12 21:39:02 +01:00
Victor Stinner
dcf17f8a55
Issue #19466 : Fix typo. Patch written by Vajrasky Kok.
2013-11-12 17:18:51 +01:00
Victor Stinner
45956b9a33
Close #19466 : Clear the frames of daemon threads earlier during the Python
...
shutdown to call objects destructors. So "unclosed file" resource warnings are
now corretly emitted for daemon threads.
2013-11-12 16:37:55 +01:00
Victor Stinner
bd303c165b
Issue #19512 , #19515 : remove shared identifiers, move identifiers where they
...
are used.
Move also _Py_IDENTIFIER() defintions to the top in modified files to remove
identifiers duplicated in the same file.
2013-11-07 23:07:29 +01:00
Victor Stinner
efa7a0e155
print_error_text() doesn't encode the filename anymore
...
Use aslo PyUnicode_FromFormat() to format the line so only one call to
PyFile_WriteObject() is needed. tb_displayline() of Python/traceback.c has
similar implementation.
2013-11-07 12:37:56 +01:00
Victor Stinner
79ed4c744a
remove an outdated comment
...
The comment is meaningless since changeset 4e985a96a612.
2013-11-07 00:53:56 +01:00
Victor Stinner
53e9ec48e5
Issue #19512 : Use the new _PyId_builtins identifier
2013-11-07 00:43:05 +01:00