platform/upstream/python-cython.git
11 years agominor code simplification
Stefan Behnel [Fri, 5 Apr 2013 10:51:16 +0000 (12:51 +0200)]
minor code simplification

11 years agomove profiling utility code into external .c file
Stefan Behnel [Fri, 5 Apr 2013 10:50:11 +0000 (12:50 +0200)]
move profiling utility code into external .c file

11 years agosimplify import-from code a little by moving the name lookup into a utility function
Stefan Behnel [Fri, 5 Apr 2013 07:15:49 +0000 (09:15 +0200)]
simplify import-from code a little by moving the name lookup into a utility function

11 years agoextend test case
Stefan Behnel [Thu, 4 Apr 2013 17:01:35 +0000 (19:01 +0200)]
extend test case

11 years agouse better internal link in documentation instead of linking to external Wiki
Stefan Behnel [Thu, 4 Apr 2013 15:55:40 +0000 (17:55 +0200)]
use better internal link in documentation instead of linking to external Wiki

11 years agoMerge pull request #203 from vmx/const-pointer
Robert Bradshaw [Wed, 3 Apr 2013 06:18:36 +0000 (23:18 -0700)]
Merge pull request #203 from vmx/const-pointer

Add support for const pointers

11 years agoAdd support for const pointers
Volker Mische [Tue, 2 Apr 2013 17:08:26 +0000 (19:08 +0200)]
Add support for const pointers

11 years agobroaden the effect of in-closure def node call inlining
Stefan Behnel [Mon, 1 Apr 2013 09:57:25 +0000 (11:57 +0200)]
broaden the effect of in-closure def node call inlining

11 years agoprevent tp_new() optimisation from breaking external types with known typeobj
Stefan Behnel [Fri, 29 Mar 2013 20:21:14 +0000 (21:21 +0100)]
prevent tp_new() optimisation from breaking external types with known typeobj

11 years agoremove unused test code
Stefan Behnel [Fri, 29 Mar 2013 18:11:44 +0000 (19:11 +0100)]
remove unused test code

11 years agofix doctest
Stefan Behnel [Fri, 29 Mar 2013 17:52:49 +0000 (18:52 +0100)]
fix doctest

11 years agoimplement __annotations__ attribute on CyFunction (PEP 3107)
Stefan Behnel [Fri, 29 Mar 2013 17:40:22 +0000 (18:40 +0100)]
implement __annotations__ attribute on CyFunction (PEP 3107)

11 years agoimplement __kwdefaults__ for CyFunction
Stefan Behnel [Fri, 29 Mar 2013 16:09:58 +0000 (17:09 +0100)]
implement __kwdefaults__ for CyFunction

11 years agoMerge pull request #200 from nnemkin/module_level_literal_arrays
Robert Bradshaw [Fri, 29 Mar 2013 10:00:27 +0000 (03:00 -0700)]
Merge pull request #200 from nnemkin/module_level_literal_arrays

Allow module-level literal lists (Fixes #113).

11 years agoAllow module-level literal lists (Fixes #113).
Nikita Nemkin [Thu, 28 Mar 2013 11:11:10 +0000 (17:11 +0600)]
Allow module-level literal lists (Fixes #113).

11 years agoConst temp regression test.
Robert Bradshaw [Tue, 26 Mar 2013 06:38:07 +0000 (23:38 -0700)]
Const temp regression test.

11 years agoFix bug with infered const temp vars.
Robert Bradshaw [Tue, 26 Mar 2013 06:30:34 +0000 (23:30 -0700)]
Fix bug with infered const temp vars.

11 years agoMerge pull request #190 from sturlamolden/master
scoder [Fri, 22 Mar 2013 20:52:48 +0000 (13:52 -0700)]
Merge pull request #190 from sturlamolden/master

Enable GCC atomic builtins on MinGW, disable on i386 target

11 years agoFlush at the end of cythonize().
Robert Bradshaw [Tue, 19 Mar 2013 17:29:22 +0000 (10:29 -0700)]
Flush at the end of cythonize().

11 years agoMerge pull request #199 from nnemkin/compile_time_strings_fix
scoder [Tue, 19 Mar 2013 14:34:13 +0000 (07:34 -0700)]
Merge pull request #199 from nnemkin/compile_time_strings_fix

Correctly handle compile-time strings appearing in Python context.

11 years agoCorrectly handle compile-time strings appearing in Python context.
Nikita Nemkin [Tue, 19 Mar 2013 12:57:57 +0000 (18:57 +0600)]
Correctly handle compile-time strings appearing in Python context.

11 years agorefactor comprehensions by removing separate target node (to simplify a future length...
Stefan Behnel [Mon, 18 Mar 2013 20:59:49 +0000 (21:59 +0100)]
refactor comprehensions by removing separate target node (to simplify a future length-hint optimisation)

--HG--
extra : rebase_source : 476b22eeaeaea1ff69ee8069328fb47ffe18ea20

11 years agoMerge pull request #198 from pv/bug/fused-refcount
scoder [Sun, 17 Mar 2013 20:03:46 +0000 (13:03 -0700)]
Merge pull request #198 from pv/bug/fused-refcount

BUG: fix reference counting bug in fused type method descriptor

11 years agoAdd test for the fused type refcounting issue
Pauli Virtanen [Sun, 17 Mar 2013 18:12:19 +0000 (20:12 +0200)]
Add test for the fused type refcounting issue

11 years agoRemove duplicate DECREF, tp_clear does it already
Pauli Virtanen [Sun, 17 Mar 2013 18:11:34 +0000 (20:11 +0200)]
Remove duplicate DECREF, tp_clear does it already

11 years agoFix fused tp_clear function prototype
Mark Florisson [Sun, 17 Mar 2013 16:54:08 +0000 (16:54 +0000)]
Fix fused tp_clear function prototype

11 years agoProperly decref objects held by fused functions
Mark Florisson [Sun, 17 Mar 2013 16:49:30 +0000 (16:49 +0000)]
Properly decref objects held by fused functions

11 years agofix 'with nogil' blocks inside of generators in C++ mode
Stefan Behnel [Sun, 17 Mar 2013 10:15:52 +0000 (11:15 +0100)]
fix 'with nogil' blocks inside of generators in C++ mode

11 years agochangelog
Stefan Behnel [Sun, 17 Mar 2013 09:27:32 +0000 (10:27 +0100)]
changelog

--HG--
extra : rebase_source : 889ca43dd6769a6208f8c69e36f2103468b3b546

11 years agoavoid GIL state temp overhead in sections that do not contain yields
Stefan Behnel [Sun, 17 Mar 2013 09:18:37 +0000 (10:18 +0100)]
avoid GIL state temp overhead in sections that do not contain yields

--HG--
extra : rebase_source : 9be74b8a1d6509acf415bf667558a635b38a902f

11 years agostore GIL state in temp variable to safely keep it across generator yields (fixes...
Stefan Behnel [Sun, 17 Mar 2013 09:05:42 +0000 (10:05 +0100)]
store GIL state in temp variable to safely keep it across generator yields (fixes ticket 803)

--HG--
extra : rebase_source : 5fd93f1cf2916c987bfc4a4d410bf4a77afb2ac9

11 years agofix compiler crash
Robert Bradshaw [Sun, 17 Mar 2013 08:11:56 +0000 (01:11 -0700)]
fix compiler crash

11 years agofix crash in staticmethods without explicit positional argument (ticket 804)
Stefan Behnel [Sun, 17 Mar 2013 07:44:21 +0000 (08:44 +0100)]
fix crash in staticmethods without explicit positional argument (ticket 804)

11 years agoimprove error message on slice deletion
Stefan Behnel [Sat, 16 Mar 2013 22:34:36 +0000 (23:34 +0100)]
improve error message on slice deletion

11 years agoadd test for absolute imports
Stefan Behnel [Sat, 16 Mar 2013 22:06:43 +0000 (23:06 +0100)]
add test for absolute imports

11 years agouse __Pyx_PyObject_GetAttrStr() in some more places
Stefan Behnel [Sat, 16 Mar 2013 21:11:04 +0000 (22:11 +0100)]
use __Pyx_PyObject_GetAttrStr() in some more places

11 years agoremove left-over code line
Stefan Behnel [Sat, 16 Mar 2013 20:55:28 +0000 (21:55 +0100)]
remove left-over code line

11 years agofix slicing in PyPy
Stefan Behnel [Sat, 16 Mar 2013 20:13:25 +0000 (21:13 +0100)]
fix slicing in PyPy

11 years agominor code cleanup
Stefan Behnel [Sat, 16 Mar 2013 18:54:08 +0000 (19:54 +0100)]
minor code cleanup

11 years agohonour wraparound option in object slicing code
Stefan Behnel [Sat, 16 Mar 2013 18:37:42 +0000 (19:37 +0100)]
honour wraparound option in object slicing code

11 years agoavoid code duplication by generating List/Tuple_GetSlice utility code from a common...
Stefan Behnel [Sat, 16 Mar 2013 17:29:32 +0000 (18:29 +0100)]
avoid code duplication by generating List/Tuple_GetSlice utility code from a common template

11 years agoavoid code duplication by generating GetSlice/SetSlice utility code from a common...
Stefan Behnel [Sat, 16 Mar 2013 17:19:15 +0000 (18:19 +0100)]
avoid code duplication by generating GetSlice/SetSlice utility code from a common template

11 years agoadd tags to tests
Stefan Behnel [Sat, 16 Mar 2013 16:39:05 +0000 (17:39 +0100)]
add tags to tests

11 years agofix passing explicit None slice indices into the getslice code, enable test case...
Stefan Behnel [Sat, 16 Mar 2013 16:09:40 +0000 (17:09 +0100)]
fix passing explicit None slice indices into the getslice code, enable test case for ticket 636

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

11 years agochangelog
Stefan Behnel [Sat, 16 Mar 2013 15:27:23 +0000 (16:27 +0100)]
changelog

11 years agoimplement correct slicing for setslice and delslice
Stefan Behnel [Sat, 16 Mar 2013 15:24:27 +0000 (16:24 +0100)]
implement correct slicing for setslice and delslice

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

11 years agofix negative slice indices
Stefan Behnel [Sat, 16 Mar 2013 14:46:46 +0000 (15:46 +0100)]
fix negative slice indices

11 years agofix ticket 636: build the correct slice objects on 2-value object slicing
Stefan Behnel [Sat, 16 Mar 2013 13:18:05 +0000 (14:18 +0100)]
fix ticket 636: build the correct slice objects on 2-value object slicing

11 years agoclean up (Set|Del)ItemInt code and fix negative indexing of objects with length ...
Stefan Behnel [Sat, 16 Mar 2013 10:08:31 +0000 (11:08 +0100)]
clean up (Set|Del)ItemInt code and fix negative indexing of objects with length > max(Py_ssize_t)

11 years agoclean up GetItemInt code and fix negative indexing of objects with length > max(Py_ss...
Stefan Behnel [Sat, 16 Mar 2013 09:26:07 +0000 (10:26 +0100)]
clean up GetItemInt code and fix negative indexing of objects with length > max(Py_ssize_t)

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.