cython.git
16 years agouse PyObject_Call() instead of _CallObject() just as Python calls it internally,...
Stefan Behnel [Mon, 14 Jan 2008 11:35:47 +0000 (12:35 +0100)]
use PyObject_Call() instead of _CallObject() just as Python calls it internally, speedup of about 5%

16 years agocleanup and faster kw arg splitting in __Pyx_GetStarArgs
Stefan Behnel [Mon, 14 Jan 2008 10:18:19 +0000 (11:18 +0100)]
cleanup and faster kw arg splitting in __Pyx_GetStarArgs

16 years agodivert tp_clear()/tp_traverse() to parent type if type has no object attributes
Stefan Behnel [Sun, 13 Jan 2008 17:51:38 +0000 (18:51 +0100)]
divert tp_clear()/tp_traverse() to parent type if type has no object attributes

16 years agoreset to None instead of NULL in tp_clear()
Stefan Behnel [Sun, 13 Jan 2008 09:11:07 +0000 (10:11 +0100)]
reset to None instead of NULL in tp_clear()

16 years agofix tp_clear() according to Python docs: zero out member pointer before decrefing...
Stefan Behnel [Sat, 12 Jan 2008 20:33:30 +0000 (21:33 +0100)]
fix tp_clear() according to Python docs: zero out member pointer before decrefing its content

16 years agoraise compiler error for 'cdef readonly class'
Stefan Behnel [Sat, 12 Jan 2008 13:45:03 +0000 (14:45 +0100)]
raise compiler error for 'cdef readonly class'

16 years agoonly generate tp_clear/traverse functions if type supports GC
Stefan Behnel [Sat, 12 Jan 2008 10:32:19 +0000 (11:32 +0100)]
only generate tp_clear/traverse functions if type supports GC

16 years agoonly reference type GC functions in extension type if GC support is required
Stefan Behnel [Sat, 12 Jan 2008 10:19:56 +0000 (11:19 +0100)]
only reference type GC functions in extension type if GC support is required

16 years agofix subclassing non-GC types like 'unicode'
Stefan Behnel [Wed, 9 Jan 2008 22:28:26 +0000 (23:28 +0100)]
fix subclassing non-GC types like 'unicode'

16 years agoBacked out changeset 4a6021b8a18c
Stefan Behnel [Wed, 9 Jan 2008 22:26:01 +0000 (23:26 +0100)]
Backed out changeset 4a6021b8a18c
there is a better way to do that

16 years agofix subclassing non-GC types like 'unicode'
Stefan Behnel [Wed, 9 Jan 2008 22:15:09 +0000 (23:15 +0100)]
fix subclassing non-GC types like 'unicode'

16 years agoanother Distutils fix: keep source directory as target if not requested otherwise
Stefan Behnel [Tue, 1 Jan 2008 09:52:53 +0000 (10:52 +0100)]
another Distutils fix: keep source directory as target if not requested otherwise

16 years agomerge of 0.9.6.10.1
Stefan Behnel [Tue, 1 Jan 2008 09:40:46 +0000 (10:40 +0100)]
merge of 0.9.6.10.1

16 years agoFatal typo fix
Robert Bradshaw [Mon, 31 Dec 2007 22:43:57 +0000 (14:43 -0800)]
Fatal typo fix

16 years agoMACOSX_DEPLOYMENT_TARGET fix for OS X 10.5
Brian Granger [Mon, 31 Dec 2007 19:53:07 +0000 (11:53 -0800)]
MACOSX_DEPLOYMENT_TARGET fix for OS X 10.5

16 years agoFix bug for python targets in for...from loops, allow non-integer numeric arguments.
Robert Bradshaw [Mon, 31 Dec 2007 19:13:26 +0000 (11:13 -0800)]
Fix bug for python targets in for...from loops, allow non-integer numeric arguments.

16 years agoC target directory fix for build_ext
Stefan Behnel [Mon, 31 Dec 2007 13:24:13 +0000 (14:24 +0100)]
C target directory fix for build_ext

16 years agomerged changes from 0.9.6.10
Stefan Behnel [Sat, 29 Dec 2007 21:58:11 +0000 (22:58 +0100)]
merged changes from 0.9.6.10

16 years agoCmd line option for convert-range, version number
Robert Bradshaw [Sat, 29 Dec 2007 18:10:05 +0000 (10:10 -0800)]
Cmd line option for convert-range, version number

17 years agofix for memory leak when using keyword-only arguments
Stefan Behnel [Wed, 19 Dec 2007 10:51:57 +0000 (11:51 +0100)]
fix for memory leak when using keyword-only arguments

17 years agokeyword-only arguments require __Pyx_GetStarArgs() function
Stefan Behnel [Wed, 19 Dec 2007 09:28:51 +0000 (10:28 +0100)]
keyword-only arguments require __Pyx_GetStarArgs() function

17 years agokeyword-only arguments require __Pyx_GetStarArgs() function
Stefan Behnel [Wed, 19 Dec 2007 09:28:51 +0000 (10:28 +0100)]
keyword-only arguments require __Pyx_GetStarArgs() function

17 years agoOverflow code (Ondrej suggested a much better way)
Robert Bradshaw [Wed, 12 Dec 2007 20:34:41 +0000 (12:34 -0800)]
Overflow code (Ondrej suggested a much better way)

17 years agoTypo fix suggested by Ondrej Certik
Robert Bradshaw [Wed, 12 Dec 2007 20:02:49 +0000 (12:02 -0800)]
Typo fix suggested by Ondrej Certik

17 years ago(Optionally) mutate range into for..from loops.
Robert Bradshaw [Wed, 12 Dec 2007 10:26:50 +0000 (02:26 -0800)]
(Optionally) mutate range into for..from loops.

17 years agoDue to occasional issues with cleanup on exit, cleanup now disabled by default.
Robert Bradshaw [Mon, 10 Dec 2007 20:23:52 +0000 (12:23 -0800)]
Due to occasional issues with cleanup on exit, cleanup now disabled by default.

17 years agoPyrex type conversion with overflow check for all int types.
Robert Bradshaw [Wed, 5 Dec 2007 22:38:25 +0000 (14:38 -0800)]
Pyrex type conversion with overflow check for all int types.

17 years agofixed broken call to compiler error function
Stefan Behnel [Sun, 2 Dec 2007 11:07:35 +0000 (12:07 +0100)]
fixed broken call to compiler error function

17 years agoRemove redundant marking code
Robert Bradshaw [Thu, 29 Nov 2007 08:21:59 +0000 (00:21 -0800)]
Remove redundant marking code

17 years agoFix classmethod for non-cdef classes.
Robert Bradshaw [Thu, 29 Nov 2007 08:09:42 +0000 (00:09 -0800)]
Fix classmethod for non-cdef classes.

17 years agomerge of Cython 0.9.6.9
Stefan Behnel [Sat, 24 Nov 2007 09:54:22 +0000 (10:54 +0100)]
merge of Cython 0.9.6.9

17 years agoChange version number
Robert Bradshaw [Wed, 21 Nov 2007 18:30:09 +0000 (10:30 -0800)]
Change version number

17 years agoAdd annotate file for html output
Robert Bradshaw [Sun, 18 Nov 2007 08:16:43 +0000 (00:16 -0800)]
Add annotate file for html output

17 years agoHTML source annotation module
Robert Bradshaw [Fri, 16 Nov 2007 21:58:58 +0000 (13:58 -0800)]
HTML source annotation module

17 years agoFix agreement of cpdef functions and pxd files
Robert Bradshaw [Sun, 11 Nov 2007 04:13:45 +0000 (20:13 -0800)]
Fix agreement of cpdef functions and pxd files

17 years agomerge of 0.9.6.8
Stefan Behnel [Fri, 9 Nov 2007 06:53:09 +0000 (07:53 +0100)]
merge of 0.9.6.8

17 years agoignore METH_COEXIST for python < 2.4
Robert Bradshaw [Wed, 7 Nov 2007 17:58:50 +0000 (09:58 -0800)]
ignore METH_COEXIST for python < 2.4

17 years agodocstrings for special methods and cpdef functions
Robert Bradshaw [Wed, 7 Nov 2007 17:48:16 +0000 (09:48 -0800)]
docstrings for special methods and cpdef functions

17 years agoRe: Disabling docstrings in generated .so?
"Gustavo Sverzut Barbieri" [Wed, 7 Nov 2007 17:20:20 +0000 (09:20 -0800)]
Re: Disabling docstrings in generated .so?

17 years agoMove assert exception object creation inside assert if block
Robert Bradshaw [Thu, 1 Nov 2007 22:46:52 +0000 (15:46 -0700)]
Move assert exception object creation inside assert if block

17 years agoVersion number change
Robert Bradshaw [Thu, 1 Nov 2007 09:55:35 +0000 (02:55 -0700)]
Version number change

17 years agomake overridable a type-level property, now overriding functions must agree
Robert Bradshaw [Thu, 1 Nov 2007 09:45:45 +0000 (02:45 -0700)]
make overridable a type-level property, now overriding functions must agree

17 years ago...
Robert Bradshaw [Thu, 1 Nov 2007 08:36:59 +0000 (01:36 -0700)]
...

17 years agoFix cpdef after merge, change so one can still call super methods
Robert Bradshaw [Thu, 1 Nov 2007 08:05:12 +0000 (01:05 -0700)]
Fix cpdef after merge, change so one can still call super methods

17 years agoenable builtin caching and cleanup
Stefan Behnel [Tue, 30 Oct 2007 12:10:25 +0000 (13:10 +0100)]
enable builtin caching and cleanup

17 years agofix DECREF of borrowed reference
Stefan Behnel [Mon, 29 Oct 2007 18:35:57 +0000 (19:35 +0100)]
fix DECREF of borrowed reference

17 years agoFix function import refcount (Stefan Behnel)
Robert Bradshaw [Thu, 1 Nov 2007 01:58:28 +0000 (18:58 -0700)]
Fix function import refcount (Stefan Behnel)

17 years agoRe-enable __index__ for Py_ssize_t, fix refcount error in that function
Robert Bradshaw [Thu, 1 Nov 2007 01:46:51 +0000 (18:46 -0700)]
Re-enable __index__ for Py_ssize_t, fix refcount error in that function

17 years agofix DECREF of borrowed reference
Stefan Behnel [Mon, 29 Oct 2007 18:35:57 +0000 (19:35 +0100)]
fix DECREF of borrowed reference

17 years agoFix missing decref in __Pyx_ImportModule
Robert Bradshaw [Sun, 28 Oct 2007 09:31:53 +0000 (02:31 -0700)]
Fix missing decref in __Pyx_ImportModule

17 years agoPyObject_Hash returns long, not int
Carl Witty [Sat, 27 Oct 2007 21:00:59 +0000 (14:00 -0700)]
PyObject_Hash returns long, not int

17 years agoerror handling code was missing
Stefan Behnel [Sat, 27 Oct 2007 12:40:39 +0000 (14:40 +0200)]
error handling code was missing

17 years agoFix crash on undeclared builtin
Robert Bradshaw [Fri, 26 Oct 2007 23:16:07 +0000 (16:16 -0700)]
Fix crash on undeclared builtin

17 years agordef -> cpdef
Robert Bradshaw [Thu, 25 Oct 2007 06:55:04 +0000 (23:55 -0700)]
rdef -> cpdef

17 years agocache builtins at module level
Robert Bradshaw [Thu, 25 Oct 2007 04:35:02 +0000 (21:35 -0700)]
cache builtins at module level

17 years agoGenerate module cleanup code
Robert Bradshaw [Wed, 24 Oct 2007 11:50:55 +0000 (04:50 -0700)]
Generate module cleanup code

Decref cdef globals, interned values, and imported types

17 years agoFix builtins caching
Robert Bradshaw [Wed, 24 Oct 2007 08:41:16 +0000 (01:41 -0700)]
Fix builtins caching

17 years agoCleanup builtin function code
Robert Bradshaw [Wed, 24 Oct 2007 08:14:41 +0000 (01:14 -0700)]
Cleanup builtin function code

17 years agoEnable relative cimports
Robert Bradshaw [Wed, 24 Oct 2007 07:15:01 +0000 (00:15 -0700)]
Enable relative cimports

17 years agoDecref error in except clause
Robert Bradshaw [Wed, 24 Oct 2007 07:14:26 +0000 (00:14 -0700)]
Decref error in except clause

Temporary variables must be set to zero or they might be XDECREF'ed later, generating very hard to track bugs.

17 years agopackage-local import patch reverted
Stefan Behnel [Sun, 21 Oct 2007 12:20:59 +0000 (14:20 +0200)]
package-local import patch reverted

17 years agoctypedef casting, more cdef extern class work
Robert Bradshaw [Sun, 21 Oct 2007 08:01:15 +0000 (01:01 -0700)]
ctypedef casting, more cdef extern class work

17 years agoFix ctypedef extern class, assignment on declaration, redeclaration warnings
Robert Bradshaw [Sun, 21 Oct 2007 05:05:04 +0000 (22:05 -0700)]
Fix ctypedef extern class, assignment on declaration, redeclaration warnings

17 years agomerge (including cwitty's change to get_exception_utility_code)
Robert Bradshaw [Sat, 20 Oct 2007 19:18:21 +0000 (12:18 -0700)]
merge (including cwitty's change to get_exception_utility_code)

17 years agoindent fix
Stefan Behnel [Thu, 18 Oct 2007 07:44:58 +0000 (09:44 +0200)]
indent fix

17 years agogreg: Tests passed
Stefan Behnel [Thu, 18 Oct 2007 07:43:42 +0000 (09:43 +0200)]
greg: Tests passed

17 years agoAdded getattr3() builtin
Stefan Behnel [Thu, 18 Oct 2007 06:55:15 +0000 (08:55 +0200)]
Added getattr3() builtin

17 years agoGeneral cdef block
Stefan Behnel [Thu, 18 Oct 2007 06:44:40 +0000 (08:44 +0200)]
General cdef block

17 years agoOnly include public types in generated headers
Stefan Behnel [Thu, 18 Oct 2007 06:30:08 +0000 (08:30 +0200)]
Only include public types in generated headers

17 years agoFix C API namespace pollution
Stefan Behnel [Thu, 18 Oct 2007 06:22:31 +0000 (08:22 +0200)]
Fix C API namespace pollution

17 years agoFix king1 - compile time == operator
Stefan Behnel [Thu, 18 Oct 2007 06:00:18 +0000 (08:00 +0200)]
Fix king1 - compile time == operator

17 years agogreg: Add --force support to distutils extension
Stefan Behnel [Wed, 17 Oct 2007 17:55:51 +0000 (19:55 +0200)]
greg: Add --force support to distutils extension

17 years agogreg: Fix ishimoto4 - calling convention omitted from func defn
Stefan Behnel [Wed, 17 Oct 2007 17:52:35 +0000 (19:52 +0200)]
greg: Fix ishimoto4 - calling convention omitted from func defn

17 years agoremoved debug code
Stefan Behnel [Wed, 17 Oct 2007 07:55:16 +0000 (09:55 +0200)]
removed debug code

17 years agoimport modules only once, support module-level imports
Stefan Behnel [Wed, 17 Oct 2007 06:44:32 +0000 (08:44 +0200)]
import modules only once, support module-level imports

17 years agopreliminary merge of Pyrex 0.9.6.2 -> crashes
Stefan Behnel [Mon, 15 Oct 2007 08:26:57 +0000 (10:26 +0200)]
preliminary merge of Pyrex 0.9.6.2 -> crashes

17 years agoFix __Pyx_GetExcValue to avoid (possibly) running Python code while the thread state...
Carl Witty [Sun, 14 Oct 2007 06:26:39 +0000 (23:26 -0700)]
Fix __Pyx_GetExcValue to avoid (possibly) running Python code while the thread state is inconsistent

17 years agomerged in changes from Cython 0.9.6.7
Stefan Behnel [Sat, 13 Oct 2007 07:25:05 +0000 (09:25 +0200)]
merged in changes from Cython 0.9.6.7

17 years agomerge of Pyrex 0.9.6.2
Stefan Behnel [Fri, 12 Oct 2007 16:26:51 +0000 (18:26 +0200)]
merge of Pyrex 0.9.6.2

17 years agoNew version
Robert Bradshaw [Thu, 11 Oct 2007 08:43:09 +0000 (01:43 -0700)]
New version

17 years agoInterned integer constants, created at module load time.
Robert Bradshaw [Thu, 11 Oct 2007 08:33:28 +0000 (01:33 -0700)]
Interned integer constants, created at module load time.

For example, in the SAGE source we have

1158 PyInt_FromLong(0)
 776 PyInt_FromLong(1)
 258 PyInt_FromLong(2)
  33 PyInt_FromLong(3)
  21 PyInt_FromLong(10)

and a thousand or so others... Who knows how many of these are in loops too.

17 years agoMinor bug fixes
Robert Bradshaw [Thu, 11 Oct 2007 06:31:46 +0000 (23:31 -0700)]
Minor bug fixes

17 years agoimported added files of Pyrex 0.9.6.2
Stefan Behnel [Thu, 11 Oct 2007 06:10:20 +0000 (08:10 +0200)]
imported added files of Pyrex 0.9.6.2

17 years agoimport of Pyrex 0.9.6.2
Stefan Behnel [Thu, 11 Oct 2007 06:08:56 +0000 (08:08 +0200)]
import of Pyrex 0.9.6.2

17 years agordef keyword for overridable methods
Robert Bradshaw [Wed, 10 Oct 2007 11:32:21 +0000 (04:32 -0700)]
rdef keyword for overridable methods

17 years agoError message (rather than traceback) on missing name in cdef declarator
Robert Bradshaw [Wed, 10 Oct 2007 10:19:20 +0000 (03:19 -0700)]
Error message (rather than traceback) on missing name in cdef declarator

17 years agoFix c++ error when using 'is' with different types.
Robert Bradshaw [Wed, 10 Oct 2007 09:46:46 +0000 (02:46 -0700)]
Fix c++ error when using 'is' with different types.

17 years agobugfix: avoid emitting code that closes a comment in the annotation comment
Thomas Hunger [Tue, 9 Oct 2007 15:20:56 +0000 (17:20 +0200)]
bugfix: avoid emitting code that closes a comment in the annotation comment

17 years agoUse PyObject_RichCompare rather than PyObject_Cmp
Robert Bradshaw [Wed, 10 Oct 2007 09:15:39 +0000 (02:15 -0700)]
Use PyObject_RichCompare rather than PyObject_Cmp
This is what the interpreter does, and allows one to
get at the actual object (rather than just its truth
value).

17 years agomerge changes for 0.9.6.7 release
Robert Bradshaw [Mon, 8 Oct 2007 18:10:00 +0000 (11:10 -0700)]
merge changes for 0.9.6.7 release

17 years ago(Python) override modifier for cdef methods
Robert Bradshaw [Tue, 2 Oct 2007 07:39:41 +0000 (00:39 -0700)]
(Python) override modifier for cdef methods

17 years agoanother fix to make it work with Robert's signature optimisation
Stefan Behnel [Sun, 23 Sep 2007 20:12:36 +0000 (22:12 +0200)]
another fix to make it work with Robert's signature optimisation

17 years agofix to still support a keyword dictionary besides kw-only args
Stefan Behnel [Sun, 23 Sep 2007 19:55:25 +0000 (21:55 +0200)]
fix to still support a keyword dictionary besides kw-only args

17 years agosupport for keyword-only arguments and required keywords (PEP 3102)
Stefan Behnel [Sun, 23 Sep 2007 19:26:36 +0000 (21:26 +0200)]
support for keyword-only arguments and required keywords (PEP 3102)

17 years agoFix traceback on conditional expression error
Robert Bradshaw [Tue, 25 Sep 2007 23:05:17 +0000 (16:05 -0700)]
Fix traceback on conditional expression error

17 years agosupport for keyword-only arguments and required keywords (PEP 3102)
Stefan Behnel [Sun, 23 Sep 2007 19:26:36 +0000 (21:26 +0200)]
support for keyword-only arguments and required keywords (PEP 3102)

17 years agoUse assert instead of if without else to ensure an object pointer is not NULL.
Thomas Hunger [Fri, 21 Sep 2007 11:16:39 +0000 (13:16 +0200)]
Use assert instead of if without else to ensure an object pointer is not NULL.

gcc complained that a variable might be used uninitialized, which is
true. If NULL is passed, all code gets executed with an
uninitialized variable which is an error in almost every case.
Since python itself never passes NULL, only a real error in
other c code could trigger the assert.

17 years agoThe changes for code execution registered the
Thomas Hunger [Wed, 19 Sep 2007 22:28:47 +0000 (00:28 +0200)]
The changes for code execution registered the
scope-entry as a variable. This means that
analyse_attribute expects to find a pointer to
a member of the c-object struct.
This is not the case for members, so we need a
special case.

17 years agoUse assignable_from for conditional node
Robert Bradshaw [Tue, 25 Sep 2007 21:47:12 +0000 (14:47 -0700)]
Use assignable_from for conditional node

Fixes

cdef int a, b
cdef int *foo = &a if a else &b

17 years agoUse PY_VERSION_HEX rather than sys.version_info for typeslot versioning.
Robert Bradshaw [Wed, 19 Sep 2007 22:35:13 +0000 (15:35 -0700)]
Use PY_VERSION_HEX rather than sys.version_info for typeslot versioning.

so the generated c files don't depend on the version of python used to run Cython