platform/upstream/python-cython.git
11 years agosupport surrogates in unicode string literals in Py3.3
Stefan Behnel [Fri, 15 Mar 2013 19:14:19 +0000 (20:14 +0100)]
support surrogates in unicode string literals in Py3.3

11 years agofix type of string constant length field in string table to Py_ssize_t (instead of...
Stefan Behnel [Fri, 15 Mar 2013 15:00:42 +0000 (16:00 +0100)]
fix type of string constant length field in string table to Py_ssize_t (instead of long)

11 years agofix handler method signature
Stefan Behnel [Fri, 15 Mar 2013 11:22:10 +0000 (12:22 +0100)]
fix handler method signature

--HG--
extra : rebase_source : a7ab075312caa8eec32ba2763647b3a238404518

11 years agosafety fix for analysis in assigned builtin methods optimisation
Stefan Behnel [Mon, 11 Mar 2013 18:25:29 +0000 (19:25 +0100)]
safety fix for analysis in assigned builtin methods optimisation

--HG--
extra : rebase_source : 8a7842eea9d10b4e8054ed3782e0efdc2b2ce02c

11 years agofix build
Stefan Behnel [Mon, 11 Mar 2013 18:15:11 +0000 (19:15 +0100)]
fix build

--HG--
extra : rebase_source : 02f74a004499a227fc7edf2ccf3a1a9728c8951f

11 years agooptimise calls on variables that reference builtin methods (e.g. pre-assigned unbound...
Stefan Behnel [Mon, 11 Mar 2013 15:58:48 +0000 (16:58 +0100)]
optimise calls on variables that reference builtin methods (e.g. pre-assigned unbound methods)

--HG--
extra : rebase_source : 4aeefab40694c611bfdaa4ecf56a3f4f6cdf3d04

11 years agoMerge pull request #197 from bfroehle/memview_static
Robert Bradshaw [Thu, 14 Mar 2013 18:49:03 +0000 (11:49 -0700)]
Merge pull request #197 from bfroehle/memview_static

BUG: Avoid exporting symbols in MemoryView utility code.

11 years agoBUG: Avoid exporting symbols in MemoryView utility code.
Bradley M. Froehle [Thu, 14 Mar 2013 18:23:16 +0000 (11:23 -0700)]
BUG: Avoid exporting symbols in MemoryView utility code.

11 years agoMerge pull request #196 from belevtsoff/master
Robert Bradshaw [Tue, 12 Mar 2013 21:40:19 +0000 (14:40 -0700)]
Merge pull request #196 from belevtsoff/master

add fdopen to stdio.pxd

11 years agoadd fdopen declaration to stdio.pxd
Dmytro [Tue, 12 Mar 2013 20:54:53 +0000 (21:54 +0100)]
add fdopen declaration to stdio.pxd

11 years agofix unused access to optimise builtin methods which could lead to invalid C code...
Stefan Behnel [Mon, 11 Mar 2013 19:06:22 +0000 (20:06 +0100)]
fix unused access to optimise builtin methods which could lead to invalid C code being generated

11 years agominor code cleanup
Stefan Behnel [Mon, 11 Mar 2013 10:24:35 +0000 (11:24 +0100)]
minor code cleanup

11 years agotransform empty comprehensions into empty literals
Stefan Behnel [Mon, 11 Mar 2013 10:17:47 +0000 (11:17 +0100)]
transform empty comprehensions into empty literals

11 years agostrip down for-in-loops with empty iterables
Stefan Behnel [Mon, 11 Mar 2013 10:00:02 +0000 (11:00 +0100)]
strip down for-in-loops with empty iterables

11 years agostrip down while-loops with constant condition
Stefan Behnel [Mon, 11 Mar 2013 09:33:59 +0000 (10:33 +0100)]
strip down while-loops with constant condition

11 years agochangelog
Stefan Behnel [Sun, 10 Mar 2013 16:20:37 +0000 (17:20 +0100)]
changelog

11 years agofix utility function name
Stefan Behnel [Sun, 10 Mar 2013 15:44:18 +0000 (16:44 +0100)]
fix utility function name

11 years agosafety fix
Stefan Behnel [Sun, 10 Mar 2013 15:24:21 +0000 (16:24 +0100)]
safety fix

11 years agooptimise list/tuple slicing, original patch by Zaur Shibzukhov
Stefan Behnel [Sun, 10 Mar 2013 14:57:33 +0000 (15:57 +0100)]
optimise list/tuple slicing, original patch by Zaur Shibzukhov

11 years agoexclude setup.py from compiled modules
Stefan Behnel [Sun, 10 Mar 2013 11:59:58 +0000 (12:59 +0100)]
exclude setup.py from compiled modules

11 years agoguard against incorrect values for PYLONG_BITS_IN_DIGIT that do not match CPython's
Stefan Behnel [Sat, 9 Mar 2013 19:27:36 +0000 (20:27 +0100)]
guard against incorrect values for PYLONG_BITS_IN_DIGIT that do not match CPython's

11 years agominor cleanups
Stefan Behnel [Sat, 9 Mar 2013 19:16:13 +0000 (20:16 +0100)]
minor cleanups

11 years agomove error handling code out of fast path
Stefan Behnel [Sat, 9 Mar 2013 16:31:46 +0000 (17:31 +0100)]
move error handling code out of fast path

11 years agoadd safety guard for ill defined user types
Stefan Behnel [Sat, 9 Mar 2013 16:28:19 +0000 (17:28 +0100)]
add safety guard for ill defined user types

11 years agosimplify PyLong unpacking code, knowing that max(digit) << max(long)
Stefan Behnel [Sat, 9 Mar 2013 16:13:59 +0000 (17:13 +0100)]
simplify PyLong unpacking code, knowing that max(digit) << max(long)

11 years agospeed up unpacking of small integers in Py3
Stefan Behnel [Sat, 9 Mar 2013 15:26:35 +0000 (16:26 +0100)]
speed up unpacking of small integers in Py3

11 years agosimplify some Py3 precompiler checks
Stefan Behnel [Sat, 9 Mar 2013 13:24:31 +0000 (14:24 +0100)]
simplify some Py3 precompiler checks

11 years agostreamline __Pyx_PyInt_AsSize_t() a bit
Stefan Behnel [Sat, 9 Mar 2013 13:18:55 +0000 (14:18 +0100)]
streamline __Pyx_PyInt_AsSize_t() a bit

11 years agoallow alternative spellings for encoding names in c_string_encoding directive, fix...
Stefan Behnel [Sat, 9 Mar 2013 10:48:33 +0000 (11:48 +0100)]
allow alternative spellings for encoding names in c_string_encoding directive, fix c_string_type=unicode

11 years agoreduce default decoding overhead in Py3
Stefan Behnel [Sat, 9 Mar 2013 10:08:36 +0000 (11:08 +0100)]
reduce default decoding overhead in Py3

11 years agosimplify Py3 checks in TypeConversion.c
Stefan Behnel [Sat, 9 Mar 2013 09:28:27 +0000 (10:28 +0100)]
simplify Py3 checks in TypeConversion.c

11 years agoraise NameError instead of KeyError when del-ing a non-existing name inside of a...
Stefan Behnel [Sat, 9 Mar 2013 08:43:00 +0000 (09:43 +0100)]
raise NameError instead of KeyError when del-ing a non-existing name inside of a Python class body

11 years agouse inlined setattr also for delattr
Stefan Behnel [Sat, 9 Mar 2013 08:03:11 +0000 (09:03 +0100)]
use inlined setattr also for delattr

11 years agospeed up object attribute setting a little
Stefan Behnel [Fri, 8 Mar 2013 21:11:43 +0000 (22:11 +0100)]
speed up object attribute setting a little

11 years agoclean up Python name assignment code, special case module globals to change module...
Stefan Behnel [Fri, 8 Mar 2013 21:02:02 +0000 (22:02 +0100)]
clean up Python name assignment code, special case module globals to change module dict directly

11 years agofix special case in for-from loop with object loop variable by adding yet another...
Stefan Behnel [Fri, 8 Mar 2013 20:49:01 +0000 (21:49 +0100)]
fix special case in for-from loop with object loop variable by adding yet another hack to the existing hack

11 years agoremove comment
Stefan Behnel [Fri, 8 Mar 2013 20:16:00 +0000 (21:16 +0100)]
remove comment

11 years agoremove unused utility code annotation
Stefan Behnel [Fri, 8 Mar 2013 19:46:20 +0000 (20:46 +0100)]
remove unused utility code annotation

11 years agoadd another failing test for iterable lookup in generators
Stefan Behnel [Fri, 8 Mar 2013 14:25:10 +0000 (15:25 +0100)]
add another failing test for iterable lookup in generators

11 years agochangelog
Stefan Behnel [Fri, 8 Mar 2013 10:35:10 +0000 (11:35 +0100)]
changelog

11 years agocdef some imported names in the parser
Stefan Behnel [Fri, 8 Mar 2013 08:38:10 +0000 (09:38 +0100)]
cdef some imported names in the parser

11 years agouse new PyDict_SetDefault() C-API function in Py3.4
Stefan Behnel [Fri, 8 Mar 2013 07:07:36 +0000 (08:07 +0100)]
use new PyDict_SetDefault() C-API function in Py3.4

11 years agouse freelists for closure classes
Stefan Behnel [Thu, 7 Mar 2013 22:20:53 +0000 (23:20 +0100)]
use freelists for closure classes

11 years agouse direct call to tp_new() slot function in closure creation
Stefan Behnel [Thu, 7 Mar 2013 21:40:32 +0000 (22:40 +0100)]
use direct call to tp_new() slot function in closure creation

11 years agospeed up lookup of Python object attributes a little
Stefan Behnel [Thu, 7 Mar 2013 21:00:01 +0000 (22:00 +0100)]
speed up lookup of Python object attributes a little

11 years agorevert last two commits - does not work for negative indices
Stefan Behnel [Thu, 7 Mar 2013 20:08:00 +0000 (21:08 +0100)]
revert last two commits - does not work for negative indices

11 years agouse more direct C-API call for slice assignments on lists
Stefan Behnel [Thu, 7 Mar 2013 19:56:56 +0000 (20:56 +0100)]
use more direct C-API call for slice assignments on lists

11 years agospeed up slicing of lists and tuples
Stefan Behnel [Thu, 7 Mar 2013 19:39:15 +0000 (20:39 +0100)]
speed up slicing of lists and tuples

11 years agoMerge pull request #193 from nnemkin/pyunicode_string_fix
scoder [Thu, 7 Mar 2013 08:16:36 +0000 (00:16 -0800)]
Merge pull request #193 from nnemkin/pyunicode_string_fix

Compatibility fix for Py_UNICODE* support.

11 years agoPass-through single surrogates in Py_UNICODE[] literal encoding routine.
Nikita Nemkin [Thu, 7 Mar 2013 07:37:12 +0000 (13:37 +0600)]
Pass-through single surrogates in Py_UNICODE[] literal encoding routine.

11 years agofix name lookup in class scope
Stefan Behnel [Thu, 7 Mar 2013 07:18:27 +0000 (08:18 +0100)]
fix name lookup in class scope

11 years agofactor out builtin access code
Stefan Behnel [Wed, 6 Mar 2013 23:30:37 +0000 (00:30 +0100)]
factor out builtin access code

11 years agospeed up access to module globals
Stefan Behnel [Wed, 6 Mar 2013 23:17:37 +0000 (00:17 +0100)]
speed up access to module globals

11 years agoMerge pull request #192 from alexis-mignon/master
Robert Bradshaw [Wed, 6 Mar 2013 22:32:39 +0000 (14:32 -0800)]
Merge pull request #192 from alexis-mignon/master

Adding +/- operators for c++ vector iterators

11 years agocompare test result with CPython
Stefan Behnel [Wed, 6 Mar 2013 22:14:30 +0000 (23:14 +0100)]
compare test result with CPython

--HG--
rename : tests/run/ref2global.pyx => tests/run/ref2global.py

11 years agofix test
Stefan Behnel [Wed, 6 Mar 2013 22:00:07 +0000 (23:00 +0100)]
fix test

11 years agofix exception message
Stefan Behnel [Wed, 6 Mar 2013 18:34:25 +0000 (19:34 +0100)]
fix exception message

11 years agoCompatibility fix: no UTF-32 codec in Python 2.4/2.5.
Nikita Nemkin [Wed, 6 Mar 2013 18:05:32 +0000 (00:05 +0600)]
Compatibility fix: no UTF-32 codec in Python 2.4/2.5.

11 years agoAdding +/- operators for iterators
Alexis Mignon [Wed, 6 Mar 2013 14:48:06 +0000 (15:48 +0100)]
Adding +/- operators for iterators

11 years agoMerge branch 'master' of github.com:cython/cython
Robert Bradshaw [Wed, 6 Mar 2013 09:31:59 +0000 (01:31 -0800)]
Merge branch 'master' of github.com:cython/cython

11 years agoDocument drawbacks of excessive typing.
Robert Bradshaw [Wed, 6 Mar 2013 09:31:16 +0000 (01:31 -0800)]
Document drawbacks of excessive typing.

11 years agoMerge pull request #191 from nnemkin/py_unicode_strings
scoder [Tue, 5 Mar 2013 18:11:36 +0000 (10:11 -0800)]
Merge pull request #191 from nnemkin/py_unicode_strings

Py_UNICODE* string support

11 years agoMore pyunicode_ptr renames.
Nikita Nemkin [Tue, 5 Mar 2013 16:44:28 +0000 (22:44 +0600)]
More pyunicode_ptr renames.

11 years agoDocumentation for Py_UNICODE* string support.
Nikita Nemkin [Tue, 5 Mar 2013 12:33:34 +0000 (18:33 +0600)]
Documentation for Py_UNICODE* string support.

11 years agoRenamed Py_UNICODE* entities to use "pyunicode_ptr" prefix; fixed small issues in...
Nikita Nemkin [Tue, 5 Mar 2013 12:25:22 +0000 (18:25 +0600)]
Renamed Py_UNICODE* entities to use "pyunicode_ptr" prefix; fixed small issues in Py_UNICODE* support.

11 years agoMerge pull request #188 from pv/pyxbuild-fixes
scoder [Mon, 4 Mar 2013 18:05:08 +0000 (10:05 -0800)]
Merge pull request #188 from pv/pyxbuild-fixes

pyximport: fix a bug crashing other processes

11 years agoMerge pull request #189 from intellimath/master
scoder [Mon, 4 Mar 2013 18:03:45 +0000 (10:03 -0800)]
Merge pull request #189 from intellimath/master

Add datetime.pxd to cython.cpython

11 years agominor code cleanup
Stefan Behnel [Mon, 4 Mar 2013 06:30:30 +0000 (07:30 +0100)]
minor code cleanup

11 years agoprovide better error message for unknown globals (copied from CPython)
Stefan Behnel [Mon, 4 Mar 2013 06:07:32 +0000 (07:07 +0100)]
provide better error message for unknown globals (copied from CPython)

--HG--
rename : tests/broken/ref2global.pyx => tests/run/ref2global.pyx

11 years agoremove redundant utility code from ExprNodes.py
Stefan Behnel [Mon, 4 Mar 2013 06:06:21 +0000 (07:06 +0100)]
remove redundant utility code from ExprNodes.py

11 years agofix reversed order of operands in constant calculation for 'in' and 'not in' operator
Stefan Behnel [Sun, 3 Mar 2013 20:27:22 +0000 (21:27 +0100)]
fix reversed order of operands in constant calculation for 'in' and 'not in' operator

11 years agoFixed a silly typo.
Nikita Nemkin [Sun, 3 Mar 2013 16:08:16 +0000 (22:08 +0600)]
Fixed a silly typo.

11 years agoFix missing `void`
Zaur Shibzukhov [Sun, 3 Mar 2013 13:45:43 +0000 (16:45 +0300)]
Fix missing `void`

11 years agoChange test to initialize by `import_datetime`
Zaur Shibzukhov [Sun, 3 Mar 2013 13:44:03 +0000 (16:44 +0300)]
Change test to initialize by `import_datetime`

11 years agoChange test to initialize by `import_datetime`
Zaur Shibzukhov [Sun, 3 Mar 2013 13:42:32 +0000 (16:42 +0300)]
Change test to initialize by `import_datetime`

11 years agoChange test to initialize by `import_datetime`
Zaur Shibzukhov [Sun, 3 Mar 2013 13:40:47 +0000 (16:40 +0300)]
Change test to initialize by `import_datetime`

11 years agoFull support for Py_UNICODE[] literals with non-BMP characters.
Nikita Nemkin [Sun, 3 Mar 2013 13:38:15 +0000 (19:38 +0600)]
Full support for Py_UNICODE[] literals with non-BMP characters.

11 years agoAdd function `import_datetime`
Zaur Shibzukhov [Sun, 3 Mar 2013 13:38:11 +0000 (16:38 +0300)]
Add function `import_datetime`

Add inline function `import_datetime` for initialization of PyDateTime C API.

11 years agoFixed explicit coercion of ctypedef'ed C types.
Nikita Nemkin [Fri, 1 Mar 2013 19:57:52 +0000 (01:57 +0600)]
Fixed explicit coercion of ctypedef'ed C types.

11 years agoWarn on C++ exception declarations for non-extern functions.
Robert Bradshaw [Sun, 3 Mar 2013 07:35:45 +0000 (23:35 -0800)]
Warn on C++ exception declarations for non-extern functions.

This will be made an error.

11 years agoMSVC fixes.
Robert Bradshaw [Sun, 3 Mar 2013 07:34:25 +0000 (23:34 -0800)]
MSVC fixes.

11 years agoTests for Py_UNICODE* string support.
Nikita Nemkin [Sun, 3 Mar 2013 06:23:17 +0000 (12:23 +0600)]
Tests for Py_UNICODE* string support.

11 years agoBasic support for Py_UNICODE* strings.
Nikita Nemkin [Sun, 3 Mar 2013 06:01:06 +0000 (12:01 +0600)]
Basic support for Py_UNICODE* strings.

11 years agoRevert "Disallow C++ exception declarations for non-extern functions."
Robert Bradshaw [Sat, 2 Mar 2013 23:39:28 +0000 (15:39 -0800)]
Revert "Disallow C++ exception declarations for non-extern functions."

This reverts commit 496c0fd91bdaab3de3df7d084db95d5c90101104.

11 years agocorrect name for basestring in Py3 to 'str' (not 'unicode')
Stefan Behnel [Sat, 2 Mar 2013 21:11:50 +0000 (22:11 +0100)]
correct name for basestring in Py3 to 'str' (not 'unicode')

11 years agofix C compiler warnings about unused parameters
Stefan Behnel [Sat, 2 Mar 2013 20:53:59 +0000 (21:53 +0100)]
fix C compiler warnings about unused parameters

11 years agooptimise isinstance(obj, basestring) and map basestring to unicode in Py3
Stefan Behnel [Sat, 2 Mar 2013 18:45:35 +0000 (19:45 +0100)]
optimise isinstance(obj, basestring) and map basestring to unicode in Py3

11 years agominor code cleanup
Stefan Behnel [Sat, 2 Mar 2013 13:59:34 +0000 (14:59 +0100)]
minor code cleanup

11 years agouse constant flags to move wraparound/boundscheck evaluation into inlined Get/Set...
Stefan Behnel [Sat, 2 Mar 2013 10:30:03 +0000 (11:30 +0100)]
use constant flags to move wraparound/boundscheck evaluation into inlined Get/Set/DelItemInt() utility functions

11 years agoDisallow C++ exception declarations for non-extern functions.
Robert Bradshaw [Fri, 1 Mar 2013 20:59:11 +0000 (12:59 -0800)]
Disallow C++ exception declarations for non-extern functions.

11 years agoreduce freelist sizes below the number of created objects
Stefan Behnel [Fri, 1 Mar 2013 12:22:42 +0000 (13:22 +0100)]
reduce freelist sizes below the number of created objects

11 years agoadd freelist test for exttype with vtable
Stefan Behnel [Fri, 1 Mar 2013 12:21:52 +0000 (13:21 +0100)]
add freelist test for exttype with vtable

11 years agoAdd missing files
zaur [Thu, 28 Feb 2013 08:23:16 +0000 (11:23 +0300)]
Add missing files

11 years agoAdd test for date/time/datetime/timedelta members
zaur [Thu, 28 Feb 2013 08:22:09 +0000 (11:22 +0300)]
Add test for date/time/datetime/timedelta members

11 years agoRemove no-gil cdivision error test.
Robert Bradshaw [Wed, 27 Feb 2013 20:44:44 +0000 (12:44 -0800)]
Remove no-gil cdivision error test.

11 years agoFix inline getters for timedelta
zaur [Wed, 27 Feb 2013 11:19:24 +0000 (14:19 +0300)]
Fix inline getters for timedelta

11 years agoAdd new line at the end of file
zaur [Wed, 27 Feb 2013 09:54:48 +0000 (12:54 +0300)]
Add new line at the end of file

11 years agoAdd datetime.pxd to cython.cpython. Part II
zaur [Wed, 27 Feb 2013 09:46:26 +0000 (12:46 +0300)]
Add datetime.pxd to cython.cpython. Part II

11 years agoDon't require the GIL for cdivision(False).
Robert Bradshaw [Wed, 27 Feb 2013 08:42:02 +0000 (00:42 -0800)]
Don't require the GIL for cdivision(False).

11 years agoproperly integrate pyximport into setup.py
Stefan Behnel [Wed, 27 Feb 2013 07:49:32 +0000 (08:49 +0100)]
properly integrate pyximport into setup.py

--HG--
extra : rebase_source : d0e52d3a06b2734287cc30fe9ef9ebd0a641b05a