platform/upstream/python-cython.git
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 agoFixed a silly typo.
Nikita Nemkin [Sun, 3 Mar 2013 16:08:16 +0000 (22:08 +0600)]
Fixed a silly typo.

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 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 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 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

11 years agodelete unused file
Stefan Behnel [Wed, 27 Feb 2013 07:47:33 +0000 (08:47 +0100)]
delete unused file

--HG--
extra : rebase_source : 3998c84c9c2a646d9588103205666d37731c41a7

11 years agouse a couple of branch prediction macros in tp_new() function, just in case
Stefan Behnel [Mon, 25 Feb 2013 18:16:21 +0000 (19:16 +0100)]
use a couple of branch prediction macros in tp_new() function, just in case

--HG--
extra : rebase_source : 32ab400fc7cf381d2267ae01b3ada7065d706ed2

11 years agoinitialise all fields to 0 when using object structs from the freelist
Stefan Behnel [Mon, 25 Feb 2013 17:53:23 +0000 (18:53 +0100)]
initialise all fields to 0 when using object structs from the freelist

--HG--
extra : rebase_source : 346e99306b247c116d988b58802ed7e7eb62754c

11 years agoenum switch test
Robert Bradshaw [Tue, 26 Feb 2013 23:56:14 +0000 (15:56 -0800)]
enum switch test

11 years agoAllow enums in switch statement optimization.
Robert Bradshaw [Tue, 26 Feb 2013 23:52:01 +0000 (15:52 -0800)]
Allow enums in switch statement optimization.

11 years agoMerge remote-tracking branch 'main/master'
Robert Bradshaw [Tue, 26 Feb 2013 10:12:55 +0000 (02:12 -0800)]
Merge remote-tracking branch 'main/master'

Conflicts:
Cython/Compiler/Options.py

11 years agoDocs for c_string_type and c_string_encoding
Robert Bradshaw [Tue, 26 Feb 2013 10:09:30 +0000 (02:09 -0800)]
Docs for c_string_type and c_string_encoding
.# Please enter the commit message for your changes. Lines starting

11 years agomultiple-choice directive type
Robert Bradshaw [Tue, 26 Feb 2013 09:54:11 +0000 (01:54 -0800)]
multiple-choice directive type

11 years agosupport 'default' encoding
Robert Bradshaw [Tue, 26 Feb 2013 09:47:20 +0000 (01:47 -0800)]
support 'default' encoding

11 years agoCleanup default encoding.
Robert Bradshaw [Tue, 26 Feb 2013 09:00:50 +0000 (01:00 -0800)]
Cleanup default encoding.

11 years agoextend test case
Stefan Behnel [Sun, 24 Feb 2013 17:54:02 +0000 (18:54 +0100)]
extend test case

11 years agodescribe ways for fast exttype instantiation in docs
Stefan Behnel [Sun, 24 Feb 2013 17:38:01 +0000 (18:38 +0100)]
describe ways for fast exttype instantiation in docs

11 years agochangelog
Stefan Behnel [Sun, 24 Feb 2013 16:53:34 +0000 (17:53 +0100)]
changelog

11 years agoextend freelist support to all subtypes that have the same object struct size
Stefan Behnel [Sun, 24 Feb 2013 16:35:43 +0000 (17:35 +0100)]
extend freelist support to all subtypes that have the same object struct size

11 years agoclarify error message
Stefan Behnel [Sun, 24 Feb 2013 16:31:38 +0000 (17:31 +0100)]
clarify error message

11 years agoinline freelist call to PyObject_Init()
Stefan Behnel [Sun, 24 Feb 2013 12:41:53 +0000 (13:41 +0100)]
inline freelist call to PyObject_Init()

11 years agowarn about ignored freelist() decorator on subtypes
Stefan Behnel [Sun, 24 Feb 2013 12:25:26 +0000 (13:25 +0100)]
warn about ignored freelist() decorator on subtypes

11 years agotest and fix tp_new() calling of cimported types
Stefan Behnel [Sun, 24 Feb 2013 11:14:09 +0000 (12:14 +0100)]
test and fix tp_new() calling of cimported types

11 years agoslightly improve test
Stefan Behnel [Sun, 24 Feb 2013 11:01:32 +0000 (12:01 +0100)]
slightly improve test

11 years agotry a potentially safer way to find out if we know the tp_new slot function of a...
Stefan Behnel [Sat, 23 Feb 2013 22:10:03 +0000 (23:10 +0100)]
try a potentially safer way to find out if we know the tp_new slot function of a type

11 years agomake sure we always have a set of directives on CClassScope instances
Stefan Behnel [Sat, 23 Feb 2013 21:51:42 +0000 (22:51 +0100)]
make sure we always have a set of directives on CClassScope instances

11 years agoprevent external base types from generating cleanup code for freelist
Stefan Behnel [Sat, 23 Feb 2013 21:51:10 +0000 (22:51 +0100)]
prevent external base types from generating cleanup code for freelist

11 years agoimplement freelist support for extension types with a @cython.freelist(N) decorator
Stefan Behnel [Sat, 23 Feb 2013 21:32:38 +0000 (22:32 +0100)]
implement freelist support for extension types with a @cython.freelist(N) decorator

11 years agominor cleanup
Stefan Behnel [Sat, 23 Feb 2013 21:19:27 +0000 (22:19 +0100)]
minor cleanup

11 years agosimplify code for directly calling module internal tp_new() slot function
Stefan Behnel [Sat, 23 Feb 2013 20:40:56 +0000 (21:40 +0100)]
simplify code for directly calling module internal tp_new() slot function

11 years agominor cleanup
Stefan Behnel [Sat, 23 Feb 2013 20:36:48 +0000 (21:36 +0100)]
minor cleanup

11 years agochangelog
Stefan Behnel [Sat, 23 Feb 2013 20:14:42 +0000 (21:14 +0100)]
changelog

11 years agooptimise tp_new() for module-internally defined types by calling the tp_new slot...
Stefan Behnel [Sat, 23 Feb 2013 17:20:53 +0000 (18:20 +0100)]
optimise tp_new() for module-internally defined types by calling the tp_new slot function directly

11 years agoimplement tp_new() optimisation with args/kwargs
Stefan Behnel [Sat, 23 Feb 2013 16:23:59 +0000 (17:23 +0100)]
implement tp_new() optimisation with args/kwargs

11 years agomake call signature of method dispatch usable for both simple and general call nodes
Stefan Behnel [Sat, 23 Feb 2013 16:20:12 +0000 (17:20 +0100)]
make call signature of method dispatch usable for both simple and general call nodes

11 years agomove tp_new() utility code into ObjectHandling.c
Stefan Behnel [Sat, 23 Feb 2013 15:47:55 +0000 (16:47 +0100)]
move tp_new() utility code into ObjectHandling.c

11 years agomove string related utility functions from Optimize.c and Optimize.py to StringTools.c
Stefan Behnel [Sat, 23 Feb 2013 15:44:16 +0000 (16:44 +0100)]
move string related utility functions from Optimize.c and Optimize.py to StringTools.c

11 years agoonly include CythonFunction utility code if it's really used, might be unused if...
Stefan Behnel [Sat, 23 Feb 2013 15:25:33 +0000 (16:25 +0100)]
only include CythonFunction utility code if it's really used, might be unused if .pxd overrides all def functions to cdef

11 years agorefactor constant string slicing and guard it against platform specific unicode strin...
Stefan Behnel [Sat, 23 Feb 2013 13:54:41 +0000 (14:54 +0100)]
refactor constant string slicing and guard it against platform specific unicode string length

11 years agoadd constant folding test for sliced unicode and bytes literals
Stefan Behnel [Sat, 23 Feb 2013 13:14:04 +0000 (14:14 +0100)]
add constant folding test for sliced unicode and bytes literals

11 years agofold sliced literal sequences (e.g. from DEFs) into constants
Stefan Behnel [Sat, 23 Feb 2013 13:09:44 +0000 (14:09 +0100)]
fold sliced literal sequences (e.g. from DEFs) into constants

11 years agofix expression node finding for bool and character values in constant folding
Stefan Behnel [Sat, 23 Feb 2013 12:02:40 +0000 (13:02 +0100)]
fix expression node finding for bool and character values in constant folding

11 years agodelete unused LongNode class
Stefan Behnel [Sat, 23 Feb 2013 10:39:14 +0000 (11:39 +0100)]
delete unused LongNode class

11 years agoadd constant folding tests for bool values
Stefan Behnel [Sat, 23 Feb 2013 10:36:26 +0000 (11:36 +0100)]
add constant folding tests for bool values

11 years agominor code cleanup
Stefan Behnel [Sat, 23 Feb 2013 10:35:53 +0000 (11:35 +0100)]
minor code cleanup

11 years agofix constant folding for repeated negation
Stefan Behnel [Sat, 23 Feb 2013 10:28:10 +0000 (11:28 +0100)]
fix constant folding for repeated negation

11 years agosupport Ellipsis as compile time constant
Stefan Behnel [Sat, 23 Feb 2013 09:55:55 +0000 (10:55 +0100)]
support Ellipsis as compile time constant

11 years agoremove duplicated code
Stefan Behnel [Sat, 23 Feb 2013 09:47:52 +0000 (10:47 +0100)]
remove duplicated code

11 years agoremove Py2.3 work-around
Stefan Behnel [Sat, 23 Feb 2013 09:47:10 +0000 (10:47 +0100)]
remove Py2.3 work-around

11 years agosimplify evaluation of --cython-only option in test runner
Stefan Behnel [Sat, 23 Feb 2013 09:20:45 +0000 (10:20 +0100)]
simplify evaluation of --cython-only option in test runner

11 years agohonour --cython-only option in compiled unit tests and pyregr tests
Stefan Behnel [Sat, 23 Feb 2013 09:14:21 +0000 (10:14 +0100)]
honour --cython-only option in compiled unit tests and pyregr tests

11 years agoautomatically replace calls to builtin.__contains__() with the corresponding C-API...
Stefan Behnel [Fri, 22 Feb 2013 19:07:09 +0000 (20:07 +0100)]
automatically replace calls to builtin.__contains__() with the corresponding C-API function and enable optimisation of unbound builtin methods for subtypes

11 years agofix the last fix
Stefan Behnel [Fri, 22 Feb 2013 17:29:48 +0000 (18:29 +0100)]
fix the last fix

11 years agoadd safety fix for method dispatch visitor
Stefan Behnel [Fri, 22 Feb 2013 17:02:07 +0000 (18:02 +0100)]
add safety fix for method dispatch visitor

11 years agorefactor __class__ replacement hack, argument coercion and self-arg checking in Attri...
Stefan Behnel [Fri, 22 Feb 2013 13:54:13 +0000 (14:54 +0100)]
refactor __class__ replacement hack, argument coercion and self-arg checking in AttributeNode

11 years agoremove method dispatch on CascadedCmpNode: currently fails to handle first (inherited...
Stefan Behnel [Fri, 22 Feb 2013 12:09:31 +0000 (13:09 +0100)]
remove method dispatch on CascadedCmpNode: currently fails to handle first (inherited) operand

11 years agofix type analysis bug
Robert Bradshaw [Fri, 22 Feb 2013 00:17:48 +0000 (16:17 -0800)]
fix type analysis bug

11 years agooptimise 'x in unicode' a bit
Stefan Behnel [Fri, 22 Feb 2013 00:11:27 +0000 (01:11 +0100)]
optimise 'x in unicode' a bit

11 years agodeclare some internal transform methods final
Stefan Behnel [Thu, 21 Feb 2013 23:57:07 +0000 (00:57 +0100)]
declare some internal transform methods final

11 years agoMerge remote-tracking branch 'main/master'
Robert Bradshaw [Thu, 21 Feb 2013 23:40:40 +0000 (15:40 -0800)]
Merge remote-tracking branch 'main/master'

11 years agoc89 fix
Robert Bradshaw [Thu, 21 Feb 2013 23:40:13 +0000 (15:40 -0800)]
c89 fix

11 years agosupport special comparison methods in method dispatch transforms
Stefan Behnel [Thu, 21 Feb 2013 22:52:15 +0000 (23:52 +0100)]
support special comparison methods in method dispatch transforms

11 years agomake test functions a bit more readable and add some additional tests
Stefan Behnel [Thu, 21 Feb 2013 21:39:35 +0000 (22:39 +0100)]
make test functions a bit more readable and add some additional tests

11 years agoremove a __class__ replacement hack from memoryview code in SliceIndexNode class
Stefan Behnel [Thu, 21 Feb 2013 21:19:28 +0000 (22:19 +0100)]
remove a __class__ replacement hack from memoryview code in SliceIndexNode class

11 years agoadd tests for non-loop usage of dict.iter*() methods
Stefan Behnel [Thu, 21 Feb 2013 20:56:53 +0000 (21:56 +0100)]
add tests for non-loop usage of dict.iter*() methods

11 years agofix utility code name
Stefan Behnel [Thu, 21 Feb 2013 20:46:06 +0000 (21:46 +0100)]
fix utility code name

11 years agofix test in Py3.1
Stefan Behnel [Thu, 21 Feb 2013 10:03:01 +0000 (11:03 +0100)]
fix test in Py3.1

11 years agoremove test that no longer compiles after C-ifying dict.iterkeys()
Stefan Behnel [Wed, 20 Feb 2013 20:01:02 +0000 (21:01 +0100)]
remove test that no longer compiles after C-ifying dict.iterkeys()

11 years agoautomatically convert dict.iter*() and dict.view*() methods to .keys/values/items...
Stefan Behnel [Wed, 20 Feb 2013 19:13:04 +0000 (20:13 +0100)]
automatically convert dict.iter*() and dict.view*() methods to .keys/values/items() in Py3 for typed dicts

11 years agomove dict.*() method implementations from Optimize.c to Builtin.c
Stefan Behnel [Wed, 20 Feb 2013 18:49:03 +0000 (19:49 +0100)]
move dict.*() method implementations from Optimize.c to Builtin.c

11 years agochangelog
Stefan Behnel [Wed, 20 Feb 2013 18:00:07 +0000 (19:00 +0100)]
changelog

11 years agofix copy+paste bug
Stefan Behnel [Wed, 20 Feb 2013 16:41:51 +0000 (17:41 +0100)]
fix copy+paste bug

11 years agoDefault encoding test.
Robert Bradshaw [Wed, 20 Feb 2013 12:07:35 +0000 (04:07 -0800)]
Default encoding test.

11 years agoAllow setting a default encoding to ease str/unicode <-> c string conversion.
Robert Bradshaw [Wed, 20 Feb 2013 11:43:38 +0000 (03:43 -0800)]
Allow setting a default encoding to ease str/unicode <-> c string conversion.

11 years agofix typo
Stefan Behnel [Wed, 20 Feb 2013 09:26:00 +0000 (10:26 +0100)]
fix typo

11 years agoclean up in unicode slicing utility function, fix 'self' reference in PyUnicode_READY...
Stefan Behnel [Wed, 20 Feb 2013 09:10:05 +0000 (10:10 +0100)]
clean up in unicode slicing utility function, fix 'self' reference in PyUnicode_READY() call

11 years agoMerge pull request #186 from intellimath/master
scoder [Wed, 20 Feb 2013 08:53:38 +0000 (00:53 -0800)]
Merge pull request #186 from intellimath/master

Add unicode slicing support

11 years agoAdd tests for negative indices in unicode_slicing and PyUnicode_READY in __Pyx_PyUnic...
zaur [Wed, 20 Feb 2013 09:33:37 +0000 (12:33 +0300)]
Add tests for negative indices in unicode_slicing and PyUnicode_READY in __Pyx_PyUnicode_Substring

11 years agoFix test unicode_slicing for compatibility between py2X/py3
zaur [Tue, 19 Feb 2013 13:37:44 +0000 (16:37 +0300)]
Fix test unicode_slicing for compatibility between py2X/py3

11 years agoMerge branch 'master' of https://github.com/intellimath/cython
zaur [Tue, 19 Feb 2013 10:16:12 +0000 (13:16 +0300)]
Merge branch 'master' of https://github.com/intellimath/cython

11 years agoAdd none check for unicode slicing, remove duplicate code, add test for non-ascii...
zaur [Tue, 19 Feb 2013 09:48:20 +0000 (12:48 +0300)]
Add none check for unicode slicing, remove duplicate code, add test for non-ascii unicode strings and None

11 years agoAdd unicode slicing support
zaur [Mon, 18 Feb 2013 19:04:26 +0000 (22:04 +0300)]
Add unicode slicing support

11 years agoAdd support for unicode slicing
zaur [Mon, 18 Feb 2013 18:46:13 +0000 (21:46 +0300)]
Add support for unicode slicing

11 years agoMerge branch 'master' of git://github.com/cython/cython
zaur [Tue, 19 Feb 2013 09:54:58 +0000 (12:54 +0300)]
Merge branch 'master' of git://github.com/cython/cython

11 years agoAdd none check for unicode slicing, remove duplicate code, add test for non-ascii...
zaur [Tue, 19 Feb 2013 09:48:20 +0000 (12:48 +0300)]
Add none check for unicode slicing, remove duplicate code, add test for non-ascii unicode strings and None

11 years agoMerge branch 'master' of https://github.com/intellimath/cython
zaur [Mon, 18 Feb 2013 19:09:56 +0000 (22:09 +0300)]
Merge branch 'master' of https://github.com/intellimath/cython