Victor Stinner
b429d3b09c
Fix doc of an internal function: unicode_write_cstr()
2012-02-22 21:22:20 +01:00
Antoine Pitrou
ba6bafcfbe
Fix compile failure under Windows
2012-02-22 16:41:50 +01:00
Victor Stinner
c516610f0b
Optimize str%arg for number formats: %i, %d, %u, %x, %p
...
Write a specialized function to write an ASCII/latin1 C char* string into a
Python Unicode string.
2012-02-22 13:55:02 +01:00
Victor Stinner
99d7ad0bb0
Micro-optimize computation of maxchar in PyUnicode_TransformDecimalToASCII()
2012-02-22 13:37:39 +01:00
Victor Stinner
da79e632c4
Micro-optimize unicode_expandtabs(): use FILL() macro to write N spaces
2012-02-22 13:37:04 +01:00
Victor Stinner
15e9ed299c
PyUnicode_New() and unicode_putchar() check for MAX_UNICODE maximum (U+10FFFF)
2012-02-22 13:36:20 +01:00
Benjamin Peterson
d9a3591ed1
merge 3.2
2012-02-21 11:12:14 -05:00
Benjamin Peterson
e249dcab7a
merge 3.2
2012-02-21 11:09:13 -05:00
Benjamin Peterson
69e9727657
ensure no one tries to hash things before the random seed is found
2012-02-21 11:08:50 -05:00
Benjamin Peterson
71f660e00f
update to Unicode 6.1
2012-02-20 22:24:29 -05:00
Georg Brandl
16fa2a1097
Forgot the "empty string -> hash == 0" special case for strings.
2012-02-21 00:50:13 +01:00
Georg Brandl
2fb477c0f0
Merge 3.2: Issue #13703 plus some related test suite fixes.
2012-02-21 00:33:36 +01:00
Georg Brandl
09a7c72cad
Merge from 3.1: Issue #13703 : add a way to randomize the hash values of basic types (str, bytes, datetime)
...
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 21:31:46 +01:00
Georg Brandl
2daf6ae249
Issue #13703 : add a way to randomize the hash values of basic types (str, bytes, datetime)
...
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 19:54:16 +01:00
Benjamin Peterson
006c5a2235
check for NULL to fix segfault
2012-02-19 20:36:12 -05:00
Benjamin Peterson
23d7f12ffb
use new generic __dict__ descriptor implementations
2012-02-19 20:02:57 -05:00
Benjamin Peterson
8eb1269c34
add generic implementation of a __dict__ descriptor for C types
2012-02-19 19:59:10 -05:00
Benjamin Peterson
b900d6a78c
initialize __dict__ if needed
2012-02-19 10:17:30 -05:00
Benjamin Peterson
2cf936fe7a
use defaults
2012-02-19 01:16:13 -05:00
Benjamin Peterson
84e821e961
merge 3.2
2012-02-19 01:14:21 -05:00
Benjamin Peterson
496c53d83e
use Py_CLEAR
2012-02-19 01:11:56 -05:00
Benjamin Peterson
01d7eba316
allow arbitrary attributes on classmethod and staticmethod ( closes #14051 )
2012-02-19 01:10:25 -05:00
Antoine Pitrou
552be9b214
Issue #13020 : Fix a reference leak when allocating a structsequence object fails.
...
Patch by Suman Saha.
2012-02-15 02:54:33 +01:00
Antoine Pitrou
4b3c7846c9
Fix indentation
2012-02-15 02:52:58 +01:00
Antoine Pitrou
37784ba5c0
Issue #13020 : Fix a reference leak when allocating a structsequence object fails.
...
Patch by Suman Saha.
2012-02-15 02:51:43 +01:00
Victor Stinner
c3a6b02d70
(Merge 3.2) Issue #13913 : normalize utf-8 codec name in UTF-8 decoder
2012-02-14 01:18:10 +01:00
Victor Stinner
cbe01342bc
Issue #13913 : normalize utf-8 codec name in UTF-8 decoder
2012-02-14 01:17:45 +01:00
Benjamin Peterson
67e700697e
merge 3.2
2012-02-10 08:47:04 -05:00
Benjamin Peterson
efe7c9d4d7
this is only a borrowed ref in Brett's branch
2012-02-10 08:46:54 -05:00
Victor Stinner
d1cd99b533
Backout d2c1521ad0a1: _Py_IDENTIFIER() uses UTF-8 again
2012-02-07 23:05:55 +01:00
Benjamin Peterson
9878b63c7c
merge 3.2
2012-02-06 11:30:05 -05:00
Benjamin Peterson
2f9c71bbba
bltinmod is borrowed, so it shouldn't be decrefed
2012-02-06 11:28:45 -05:00
Victor Stinner
d446d8e09a
_Py_Identifier are always ASCII strings
2012-02-05 01:45:45 +01:00
Benjamin Peterson
951138c795
merge 3.2
2012-02-03 19:25:01 -05:00
Benjamin Peterson
90b13583bc
put returns on their own lines
2012-02-03 19:22:31 -05:00
Benjamin Peterson
2372bb0722
merge 3.2 ( closes #13908 )
2012-01-29 20:17:07 -05:00
Benjamin Peterson
2652d2570e
ready types returned from PyType_FromSpec
2012-01-29 20:16:37 -05:00
Benjamin Peterson
e28108cbd7
adjust declaration
2012-01-29 20:13:18 -05:00
Antoine Pitrou
7ab4af0427
Issue #13848 : open() and the FileIO constructor now check for NUL characters in the file name.
...
Patch by Hynek Schlawack.
2012-01-29 18:43:36 +01:00
Antoine Pitrou
1334884ff2
Issue #13848 : open() and the FileIO constructor now check for NUL characters in the file name.
...
Patch by Hynek Schlawack.
2012-01-29 18:36:34 +01:00
Mark Dickinson
963816defc
Merge 3.2 -> default (issue 13889)
2012-01-27 21:17:04 +00:00
Mark Dickinson
261896b559
Issue #13889 : Add missing _Py_SET_53BIT_PRECISION_* calls around uses of dtoa.c functions in float round.
2012-01-27 21:16:01 +00:00
Georg Brandl
20f6bc20bd
merge with 3.2
2012-01-22 21:31:39 +01:00
Georg Brandl
beca27a394
Fix #13834 : strip() strips leading and trailing whitespace.
2012-01-22 21:31:21 +01:00
Benjamin Peterson
ce79852077
use the static identifier api for looking up special methods
...
I had to move the static identifier code from unicodeobject.h to object.h in
order for this to work.
2012-01-22 11:24:29 -05:00
Antoine Pitrou
ac456a1839
Fix some of the remaining test_capi leaks
2012-01-18 21:35:21 +01:00
Antoine Pitrou
8b0a74e936
Fix some of the remaining test_capi refleaks
2012-01-18 21:29:05 +01:00
Antoine Pitrou
84091bfa45
Fix some of the refleaks in test_capi (ported from 3.2)
2012-01-18 21:24:18 +01:00
Antoine Pitrou
55f217f22d
Fix refleaks in test_capi
...
(this was easier than I thought!)
2012-01-18 21:23:13 +01:00
Antoine Pitrou
bb5b92d324
Merge refleak fixes from 3.2
2012-01-18 16:19:19 +01:00