cython.git
14 years agossize_t in Cython now means Py_ssize_t in C ((ticket #399))
Lisandro Dalcin [Fri, 30 Apr 2010 18:35:39 +0000 (15:35 -0300)]
ssize_t in Cython now means Py_ssize_t in C ((ticket #399))

14 years agotest fix after extending dead code removal
Stefan Behnel [Thu, 29 Apr 2010 06:48:19 +0000 (08:48 +0200)]
test fix after extending dead code removal

14 years agoextended test case
Stefan Behnel [Thu, 29 Apr 2010 06:35:35 +0000 (08:35 +0200)]
extended test case

14 years agocode cleanup for if-const dead code removal
Stefan Behnel [Thu, 29 Apr 2010 06:26:06 +0000 (08:26 +0200)]
code cleanup for if-const dead code removal

14 years agoextended test case
Stefan Behnel [Thu, 29 Apr 2010 06:06:02 +0000 (08:06 +0200)]
extended test case

14 years agoextended test case
Stefan Behnel [Thu, 29 Apr 2010 06:01:34 +0000 (08:01 +0200)]
extended test case

14 years agocode cleanup for if-const dead code removal: move handling into ConstantFolding trans...
Stefan Behnel [Thu, 29 Apr 2010 06:00:37 +0000 (08:00 +0200)]
code cleanup for if-const dead code removal: move handling into ConstantFolding transform, where it can also replace the entire node

--HG--
rename : tests/run/consts.pyx => tests/run/if_const.pyx

14 years agonew test case
Stefan Behnel [Thu, 29 Apr 2010 05:49:46 +0000 (07:49 +0200)]
new test case

14 years agosizeof(long double)==sizeof(double) in MSVC conficts with numpy built with MinGW
dalcinl [Wed, 28 Apr 2010 23:30:58 +0000 (20:30 -0300)]
sizeof(long double)==sizeof(double) in MSVC conficts with numpy built with MinGW

14 years agofix testcase
Lisandro Dalcin [Wed, 28 Apr 2010 19:29:02 +0000 (16:29 -0300)]
fix testcase

14 years agointroduce CYTHON_UNUSED macro to annotate functions and parametes
Lisandro Dalcin [Wed, 28 Apr 2010 19:18:43 +0000 (16:18 -0300)]
introduce CYTHON_UNUSED macro to annotate functions and parametes
- Silent compiler warnings about unused function/parametes
- Defined to __attribute__((__unused__)) for GCC(>3.4) and ICC
- Applied to a __{get|release}buffer__ special methods
- Applied to a couple of (self,unused) parameter pairs

14 years agoPy3: __cmp__ is gone, __bool__ instead of __nonzero__
Lisandro Dalcin [Wed, 28 Apr 2010 15:04:13 +0000 (12:04 -0300)]
Py3: __cmp__ is gone, __bool__ instead of __nonzero__

14 years agoextended test case
Stefan Behnel [Wed, 28 Apr 2010 11:34:36 +0000 (13:34 +0200)]
extended test case

14 years agoextended test
Stefan Behnel [Tue, 27 Apr 2010 19:36:49 +0000 (21:36 +0200)]
extended test

14 years agomore dead code removal for conditionals
Stefan Behnel [Tue, 27 Apr 2010 19:31:20 +0000 (21:31 +0200)]
more dead code removal for conditionals

14 years agoavoid generating code for 'if' conditions that are known to be False
Stefan Behnel [Tue, 27 Apr 2010 18:37:32 +0000 (20:37 +0200)]
avoid generating code for 'if' conditions that are known to be False

14 years agofix constant folding in PrimaryCmpNode/CascadedCmpNode
Stefan Behnel [Tue, 27 Apr 2010 15:25:42 +0000 (17:25 +0200)]
fix constant folding in PrimaryCmpNode/CascadedCmpNode

14 years agosupport casting '<bytes>int_val' and coercing integers to bytes on assignment
Stefan Behnel [Tue, 27 Apr 2010 05:34:45 +0000 (07:34 +0200)]
support casting '<bytes>int_val' and coercing integers to bytes on assignment

14 years agoextended test case
Stefan Behnel [Mon, 26 Apr 2010 06:38:34 +0000 (08:38 +0200)]
extended test case

14 years agofix bytes indexing
Stefan Behnel [Mon, 26 Apr 2010 06:38:24 +0000 (08:38 +0200)]
fix bytes indexing

14 years agoPy3 test fix
Stefan Behnel [Mon, 26 Apr 2010 05:17:52 +0000 (07:17 +0200)]
Py3 test fix

14 years agokeep 'constant_result' set when injecting new constant nodes
Stefan Behnel [Mon, 26 Apr 2010 04:51:23 +0000 (06:51 +0200)]
keep 'constant_result' set when injecting new constant nodes

14 years agomerge
Stefan Behnel [Sun, 25 Apr 2010 19:55:39 +0000 (21:55 +0200)]
merge

14 years agooptimised char/Py_UNICODE indexing of bytes/unicode objects
Stefan Behnel [Sun, 25 Apr 2010 19:55:26 +0000 (21:55 +0200)]
optimised char/Py_UNICODE indexing of bytes/unicode objects

14 years agowhitespace
Stefan Behnel [Sun, 25 Apr 2010 18:31:19 +0000 (20:31 +0200)]
whitespace

14 years agocoerce Py_UNICODE to and from single character unicode strings by default
Stefan Behnel [Sun, 25 Apr 2010 16:14:58 +0000 (18:14 +0200)]
coerce Py_UNICODE to and from single character unicode strings by default

14 years agotiny cleanup
Robert Bradshaw [Sun, 25 Apr 2010 06:49:39 +0000 (23:49 -0700)]
tiny cleanup

14 years agoSome SCons fixups
Dag Sverre Seljebotn [Fri, 23 Apr 2010 17:49:29 +0000 (19:49 +0200)]
Some SCons fixups

14 years agosupport arbitrarily sized typedef integral types
Lisandro Dalcin [Fri, 23 Apr 2010 16:02:07 +0000 (13:02 -0300)]
support arbitrarily sized typedef integral types

14 years agoreverted last commit - only a problem for closure scope
Stefan Behnel [Fri, 23 Apr 2010 13:00:34 +0000 (15:00 +0200)]
reverted last commit - only a problem for closure scope

14 years agosort ext type fields in GC functions to get a more predictable C code result
Stefan Behnel [Fri, 23 Apr 2010 12:41:32 +0000 (14:41 +0200)]
sort ext type fields in GC functions to get a more predictable C code result

14 years agofix signatures in numpy.pxd
Stefan Behnel [Fri, 23 Apr 2010 10:50:45 +0000 (12:50 +0200)]
fix signatures in numpy.pxd

14 years agoPyrexTypes: reworked ranking of numeric types and cleanup
Lisandro Dalcin [Thu, 22 Apr 2010 17:10:16 +0000 (14:10 -0300)]
PyrexTypes: reworked ranking of numeric types and cleanup

14 years agocustom from_py converter for Py_UNICODE
Lisandro Dalcin [Thu, 22 Apr 2010 15:31:52 +0000 (12:31 -0300)]
custom from_py converter for Py_UNICODE

14 years agocleanup
Stefan Behnel [Thu, 22 Apr 2010 13:09:04 +0000 (15:09 +0200)]
cleanup

14 years agoextended test case
Stefan Behnel [Thu, 22 Apr 2010 13:08:42 +0000 (15:08 +0200)]
extended test case

14 years agoextended test cases
Stefan Behnel [Thu, 22 Apr 2010 12:24:26 +0000 (14:24 +0200)]
extended test cases

14 years agoextended test case
Stefan Behnel [Thu, 22 Apr 2010 12:13:58 +0000 (14:13 +0200)]
extended test case

14 years agoadded PyUnicode_FromOrdinal() to unicode.pxd
Stefan Behnel [Thu, 22 Apr 2010 11:03:14 +0000 (13:03 +0200)]
added PyUnicode_FromOrdinal() to unicode.pxd

14 years agoadded PyUnicode_FromOrdinal() to unicode.pxd
Stefan Behnel [Thu, 22 Apr 2010 11:02:56 +0000 (13:02 +0200)]
added PyUnicode_FromOrdinal() to unicode.pxd

14 years agoremove Py_UNICODE from standard imports as it is now a builtin type
Stefan Behnel [Thu, 22 Apr 2010 10:57:28 +0000 (12:57 +0200)]
remove Py_UNICODE from standard imports as it is now a builtin type

14 years agofix gcc warning in test
Stefan Behnel [Thu, 22 Apr 2010 10:53:57 +0000 (12:53 +0200)]
fix gcc warning in test

14 years agocleanup
Stefan Behnel [Thu, 22 Apr 2010 10:30:04 +0000 (12:30 +0200)]
cleanup

14 years agogenerate switch-case characters in sorted order for 'char_val in bytes'
Stefan Behnel [Thu, 22 Apr 2010 10:27:49 +0000 (12:27 +0200)]
generate switch-case characters in sorted order for 'char_val in bytes'

14 years agosimplify ExprNode.as_none_safe_node() with a sensible default exception type
Stefan Behnel [Thu, 22 Apr 2010 06:03:46 +0000 (08:03 +0200)]
simplify ExprNode.as_none_safe_node() with a sensible default exception type

14 years agoLet ssize_t be a native type (ticket #399)
Lisandro Dalcin [Thu, 22 Apr 2010 00:47:54 +0000 (21:47 -0300)]
Let ssize_t be a native type (ticket #399)

14 years agoPyrexTypes: simplify CIntType, add CReturnCodeType
Lisandro Dalcin [Wed, 21 Apr 2010 22:11:14 +0000 (19:11 -0300)]
PyrexTypes: simplify CIntType, add CReturnCodeType

14 years agogeneric way to wrap an ExprNode in a NoneCheckNode
Stefan Behnel [Wed, 21 Apr 2010 13:36:27 +0000 (15:36 +0200)]
generic way to wrap an ExprNode in a NoneCheckNode

14 years agoset default debug flag to write out exceptions
Stefan Behnel [Wed, 21 Apr 2010 13:35:09 +0000 (15:35 +0200)]
set default debug flag to write out exceptions

14 years agoextended test case for unicode characters in switch statement
Stefan Behnel [Wed, 21 Apr 2010 12:01:11 +0000 (14:01 +0200)]
extended test case for unicode characters in switch statement

14 years agotest fix
Stefan Behnel [Wed, 21 Apr 2010 09:42:08 +0000 (11:42 +0200)]
test fix

14 years agoimplement 'char_val in bytes_string' and 'pyunicode_val in unicode_string'
Stefan Behnel [Tue, 20 Apr 2010 13:36:14 +0000 (15:36 +0200)]
implement 'char_val in bytes_string' and 'pyunicode_val in unicode_string'
optimise literal string case using a switch statement
enable switch transform for regular PrimaryCmpNode

14 years agoBugfix in numpy.pxd
Eric Firing [Tue, 20 Apr 2010 08:16:13 +0000 (10:16 +0200)]
Bugfix in numpy.pxd

14 years agosafety fix: why should the return type always be exactly PyObject if it is known...
Stefan Behnel [Tue, 20 Apr 2010 07:17:16 +0000 (09:17 +0200)]
safety fix: why should the return type always be exactly PyObject if it is known to be bool?

14 years agotypo
Stefan Behnel [Tue, 20 Apr 2010 06:27:40 +0000 (08:27 +0200)]
typo

14 years agoextended test case
Stefan Behnel [Tue, 20 Apr 2010 06:25:35 +0000 (08:25 +0200)]
extended test case

14 years agoPy2 test fix
Stefan Behnel [Mon, 19 Apr 2010 08:43:39 +0000 (10:43 +0200)]
Py2 test fix

14 years agoPy3 test fix
Stefan Behnel [Mon, 19 Apr 2010 08:39:49 +0000 (10:39 +0200)]
Py3 test fix

14 years agonative support for Py_UNICODE, coercion between 1-character unicode literals and...
Stefan Behnel [Mon, 19 Apr 2010 07:50:19 +0000 (09:50 +0200)]
native support for Py_UNICODE, coercion between 1-character unicode literals and Py_UNICODE, fix C iteration over unicode strings by using Py_UNICODE*

14 years agosignedness fix for unicode-for-loop iteration
Stefan Behnel [Sun, 18 Apr 2010 21:21:10 +0000 (23:21 +0200)]
signedness fix for unicode-for-loop iteration

14 years agoimplement "for int_var in bytes_string" and "for int_var in unicode_string"
Stefan Behnel [Sun, 18 Apr 2010 21:06:11 +0000 (23:06 +0200)]
implement "for int_var in bytes_string" and "for int_var in unicode_string"

14 years agoremoved dead code from test
Stefan Behnel [Sun, 18 Apr 2010 14:45:41 +0000 (16:45 +0200)]
removed dead code from test

14 years agocleanup
Stefan Behnel [Sun, 18 Apr 2010 11:39:47 +0000 (13:39 +0200)]
cleanup

14 years agore-enable working test in Py2.4
Stefan Behnel [Sun, 18 Apr 2010 11:38:51 +0000 (13:38 +0200)]
re-enable working test in Py2.4

14 years agosupport for all C scalar types in pure mode
Lisandro Dalcin [Fri, 16 Apr 2010 14:08:48 +0000 (11:08 -0300)]
support for all C scalar types in pure mode

14 years agoremove unused sign_and_rank_to_type mapping
Lisandro Dalcin [Fri, 16 Apr 2010 13:58:54 +0000 (10:58 -0300)]
remove unused sign_and_rank_to_type mapping

14 years agodefine PyBytes_XXX for Py<2.6 and use these through the codebase
Lisandro Dalcin [Fri, 16 Apr 2010 13:31:25 +0000 (10:31 -0300)]
define PyBytes_XXX for Py<2.6 and use these through the codebase

14 years agospecial case '=None' default arguments in ext arg type testing: automatically allow...
Stefan Behnel [Fri, 16 Apr 2010 11:52:19 +0000 (13:52 +0200)]
special case '=None' default arguments in ext arg type testing: automatically allow None in this case

14 years agosafety import fix: 'io' isn't a very unique module name
Stefan Behnel [Fri, 16 Apr 2010 07:04:57 +0000 (09:04 +0200)]
safety import fix: 'io' isn't a very unique module name

14 years agoPy2.4 test fixes
Stefan Behnel [Fri, 16 Apr 2010 07:02:31 +0000 (09:02 +0200)]
Py2.4 test fixes

14 years agofix PyBytes_GET_SIZE usage
Stefan Behnel [Fri, 16 Apr 2010 06:43:24 +0000 (08:43 +0200)]
fix PyBytes_GET_SIZE usage

14 years agomerge
Stefan Behnel [Thu, 15 Apr 2010 21:18:28 +0000 (23:18 +0200)]
merge

14 years agofix calling bool() and float() without arguments
Stefan Behnel [Thu, 15 Apr 2010 21:18:08 +0000 (23:18 +0200)]
fix calling bool() and float() without arguments

14 years agosupport 'frozenset' in cython namespace (just like 'set')
Stefan Behnel [Thu, 15 Apr 2010 21:17:10 +0000 (23:17 +0200)]
support 'frozenset' in cython namespace (just like 'set')

14 years agoreworked type promotion rules, nearly identical to the one in Pyrex
Lisandro Dalcin [Thu, 15 Apr 2010 19:12:04 +0000 (16:12 -0300)]
reworked type promotion rules, nearly identical to the one in Pyrex

14 years agomore type check removal during optimisations
Stefan Behnel [Thu, 15 Apr 2010 14:25:13 +0000 (16:25 +0200)]
more type check removal during optimisations

14 years agofix coercion optimisation
Stefan Behnel [Thu, 15 Apr 2010 14:20:11 +0000 (16:20 +0200)]
fix coercion optimisation

14 years agocleanup
Stefan Behnel [Thu, 15 Apr 2010 14:13:55 +0000 (16:13 +0200)]
cleanup

14 years agotransform bool(x) into a type coercion
Stefan Behnel [Thu, 15 Apr 2010 14:00:47 +0000 (16:00 +0200)]
transform bool(x) into a type coercion

14 years agorefactoring: provide explicit method to retrieve the current environment in an EnvTra...
Stefan Behnel [Thu, 15 Apr 2010 13:58:36 +0000 (15:58 +0200)]
refactoring: provide explicit method to retrieve the current environment in an EnvTransform

14 years agofix stupid crash
Stefan Behnel [Thu, 15 Apr 2010 13:24:36 +0000 (15:24 +0200)]
fix stupid crash

14 years agofaster way to test certain builtin types for truth: list, tuple, bytes, unicode;...
Stefan Behnel [Thu, 15 Apr 2010 12:52:40 +0000 (14:52 +0200)]
faster way to test certain builtin types for truth: list, tuple, bytes, unicode; fix truth testing of bytes literals

14 years agoprint correct column in error message
Stefan Behnel [Thu, 15 Apr 2010 10:33:14 +0000 (12:33 +0200)]
print correct column in error message

14 years agomerge
Stefan Behnel [Thu, 15 Apr 2010 09:44:33 +0000 (11:44 +0200)]
merge

14 years agosupport 'not None' and 'or None' on any Python argument
Stefan Behnel [Thu, 15 Apr 2010 09:43:57 +0000 (11:43 +0200)]
support 'not None' and 'or None' on any Python argument

14 years agodo not emit C code for unused special method docstrings
Lisandro Dalcin [Thu, 15 Apr 2010 00:15:42 +0000 (21:15 -0300)]
do not emit C code for unused special method docstrings

14 years agoenable 'not/or None' annotation for builtin types
Stefan Behnel [Wed, 14 Apr 2010 20:47:30 +0000 (22:47 +0200)]
enable 'not/or None' annotation for builtin types

14 years agomerge
Stefan Behnel [Wed, 14 Apr 2010 19:44:27 +0000 (21:44 +0200)]
merge

14 years agoquick fix for 'not None' tests
Stefan Behnel [Wed, 14 Apr 2010 19:44:15 +0000 (21:44 +0200)]
quick fix for 'not None' tests

14 years agofixes and tests for enum in bool contexts and func args
Lisandro Dalcin [Wed, 14 Apr 2010 19:37:19 +0000 (16:37 -0300)]
fixes and tests for enum in bool contexts and func args

14 years agominor refactoring to reduce code redundancy
Stefan Behnel [Wed, 14 Apr 2010 17:46:43 +0000 (19:46 +0200)]
minor refactoring to reduce code redundancy

14 years agofix typo in previous commit
Lisandro Dalcin [Wed, 14 Apr 2010 17:14:49 +0000 (14:14 -0300)]
fix typo in previous commit

14 years agoquick fix for bug introduced in commit 3d7f9142d2f0
Lisandro Dalcin [Wed, 14 Apr 2010 17:14:11 +0000 (14:14 -0300)]
quick fix for bug introduced in commit 3d7f9142d2f0

14 years agoadd test for long long complex type
Lisandro Dalcin [Wed, 14 Apr 2010 16:14:49 +0000 (13:14 -0300)]
add test for long long complex type

14 years agocleanup and minor fixes in PyrexTypes.py
Lisandro Dalcin [Wed, 14 Apr 2010 16:10:01 +0000 (13:10 -0300)]
cleanup and minor fixes in PyrexTypes.py

14 years agoadd C++ test for an additional level of template nesting
Lisandro Dalcin [Wed, 14 Apr 2010 15:18:21 +0000 (12:18 -0300)]
add C++ test for an additional level of template nesting

--HG--
extra : rebase_source : 1b2428d6eb5f92a0e0fd0818b71f7acdb57b15f4

14 years agoimplement 'allow_none_for_extension_args' directive for 'not None' and 'or None'...
Stefan Behnel [Wed, 14 Apr 2010 14:52:42 +0000 (16:52 +0200)]
implement 'allow_none_for_extension_args' directive for 'not None' and 'or None' arg anntation

14 years agoquick fix for annotations not working with string source descriptors
Lisandro Dalcin [Tue, 13 Apr 2010 18:14:23 +0000 (15:14 -0300)]
quick fix for annotations not working with string source descriptors

14 years agorename local variable __import__ -> py_import in utility code
Lisandro Dalcin [Mon, 12 Apr 2010 20:48:59 +0000 (17:48 -0300)]
rename local variable __import__ -> py_import in utility code

14 years agoDisable random annotations for now.
Robert Bradshaw [Mon, 12 Apr 2010 17:07:28 +0000 (10:07 -0700)]
Disable random annotations for now.