cython.git
13 years agoConvert CFuncDefNode to use explicit visibilities.
W. Trevor King [Thu, 3 Mar 2011 12:59:52 +0000 (07:59 -0500)]
Convert CFuncDefNode to use explicit visibilities.

13 years agoConvert CEnumDefNode and CEnumDefItemNode to use explicit visibilities.
W. Trevor King [Thu, 3 Mar 2011 01:43:36 +0000 (20:43 -0500)]
Convert CEnumDefNode and CEnumDefItemNode to use explicit visibilities.

13 years agoConvert CStructOrUnionDefNode and CppClassNode to use explicit visibilities.
W. Trevor King [Wed, 2 Mar 2011 21:48:46 +0000 (16:48 -0500)]
Convert CStructOrUnionDefNode and CppClassNode to use explicit visibilities.

13 years agoConvert CVarDefNode to use explicit visibilities.
W. Trevor King [Wed, 2 Mar 2011 16:19:17 +0000 (11:19 -0500)]
Convert CVarDefNode to use explicit visibilities.

This required some cleanups in Parsing.p_visibility, and the explicit
return to private visibility (for both C and Python) when parsing
C-backed class bodies.

13 years agoReverse format changes (line wrapping, etc.) to reduce differences with main branch.
W. Trevor King [Wed, 2 Mar 2011 14:47:14 +0000 (09:47 -0500)]
Reverse format changes (line wrapping, etc.) to reduce differences with main branch.

13 years agoGo back to cname instead of c_name to reduce churn.
W. Trevor King [Wed, 2 Mar 2011 02:21:00 +0000 (21:21 -0500)]
Go back to cname instead of c_name to reduce churn.

13 years agoMove Binding attributes back into a flat namespace.
W. Trevor King [Wed, 2 Mar 2011 02:16:30 +0000 (21:16 -0500)]
Move Binding attributes back into a flat namespace.

13 years agoAdd WTK_* versions of most Symtab methods that accept Binding class arguments.
W. Trevor King [Tue, 1 Mar 2011 21:36:07 +0000 (16:36 -0500)]
Add WTK_* versions of most Symtab methods that accept Binding class arguments.

I'll replace the old versions (which currently are thin wrappers
around the WTK_* method) once all references to them have been
removed.

13 years agoMove Entry.visibility into Binding.* attributes.
W. Trevor King [Thu, 24 Feb 2011 17:03:13 +0000 (12:03 -0500)]
Move Entry.visibility into Binding.* attributes.

13 years agoMove Cython.Compiler.Symtab.Entry.name, .cname, and .api into Binding.* objects.
W. Trevor King [Thu, 24 Feb 2011 14:55:21 +0000 (09:55 -0500)]
Move Cython.Compiler.Symtab.Entry.name, .cname, and .api into Binding.* objects.

13 years agoMove CtxAttributes from Cython.Compiler.Parsing to Cython.Compiler.Binding.
W. Trevor King [Wed, 23 Feb 2011 16:53:15 +0000 (11:53 -0500)]
Move CtxAttributes from  Cython.Compiler.Parsing to Cython.Compiler.Binding.

This will avoid cyclic dependencies when we start messing with
CSource, CBinding, and PythonBinding in Cython.Compiler.Symtab and
friends.

13 years agoCondense p_cdef_statement() into p_statement() to reduce parsing duplication.
W. Trevor King [Tue, 22 Feb 2011 21:15:44 +0000 (16:15 -0500)]
Condense p_cdef_statement() into p_statement() to reduce parsing duplication.

13 years agoFlatten redundant nesting in Parsing.p_statement().
W. Trevor King [Tue, 22 Feb 2011 20:56:57 +0000 (15:56 -0500)]
Flatten redundant nesting in Parsing.p_statement().

13 years agoRename CSource.cdef -> CSource.cdef_flag.
W. Trevor King [Tue, 22 Feb 2011 20:10:49 +0000 (15:10 -0500)]
Rename CSource.cdef -> CSource.cdef_flag.

Thanks to Stefan Behnel's for reminding me that cdef is a keyword ;).

This change will make it clearer that we're defining a normal
attribute, and it protects us from future shifts in grammar.

13 years agop_ctypedef shares central p_binding in p_statement.
W. Trevor King [Tue, 22 Feb 2011 19:49:02 +0000 (14:49 -0500)]
p_ctypedef shares central p_binding in p_statement.

13 years agoRename p_c_python_binding -> p_binding and bring in api parsing.
W. Trevor King [Tue, 22 Feb 2011 18:24:57 +0000 (13:24 -0500)]
Rename p_c_python_binding -> p_binding and bring in api parsing.

13 years agoAdd `CtxAttribute`s for source/binding specification to Parsing.py.
W. Trevor King [Tue, 22 Feb 2011 15:22:48 +0000 (10:22 -0500)]
Add `CtxAttribute`s for source/binding specification to Parsing.py.

This makes the various meanings of visibility explicit in Ctx.  At the
moment, the meanings are all rolled back into a single string before
being passed to the Nodes.  The next step will be to pass the
CtxAttribute instances to Nodes directly, so Node implementations will
also be explicit about the meaning of visibility.

Passes runtests.py on my system.

13 years agoAdd logger to trace function calls in Parsing.py.
W. Trevor King [Mon, 21 Feb 2011 14:16:23 +0000 (09:16 -0500)]
Add logger to trace function calls in Parsing.py.

13 years agoAdjust expected test error messages to match p_c_python_binding parsing.
W. Trevor King [Sun, 20 Feb 2011 02:02:37 +0000 (21:02 -0500)]
Adjust expected test error messages to match p_c_python_binding parsing.

13 years agoParse Python bindings for structs, enums, and unions.
W. Trevor King [Sat, 19 Feb 2011 19:45:35 +0000 (14:45 -0500)]
Parse Python bindings for structs, enums, and unions.

Add p_c_python_binding to Cython.Compiler.Parsing and use it to parse
Python bindings of the form

    [cdef|cpdef] <visibility>

where <visibility> is only checked if the cdef flag is set.

In some places (e.g. stucts, enums, unions, and their members) this
syntax is new.  For classes and their members, p_c_python_binding
mimics the previous implementation.  Where the syntax is new, the
supporting Node changes have not yet been implemented.

The test suite currently passes with the exception of position
specifications for some error messages.  I'm waiting for feedback from
the mailing list to see how these should be addressed.

13 years agoFlesh out tests/compile/cpdef.pyx to test cdef-ed enums, structs, and unions.
W. Trevor King [Fri, 18 Feb 2011 19:34:28 +0000 (14:34 -0500)]
Flesh out tests/compile/cpdef.pyx to test cdef-ed enums, structs, and unions.

13 years agomodule_is_name should not be static so that cython freeze can access it
Robert Bradshaw [Fri, 18 Feb 2011 02:04:16 +0000 (18:04 -0800)]
module_is_name should not be static so that cython freeze can access it

13 years agoAllow embed option to take function name.
Robert Bradshaw [Thu, 17 Feb 2011 22:47:01 +0000 (14:47 -0800)]
Allow embed option to take function name.

13 years agoCreate .gitignore and update .hgignore (thanks to W. Trevor King)
Lisandro Dalcin [Thu, 17 Feb 2011 15:20:58 +0000 (12:20 -0300)]
Create .gitignore and update .hgignore (thanks to W. Trevor King)

13 years agocimport test
Robert Bradshaw [Thu, 17 Feb 2011 00:53:53 +0000 (16:53 -0800)]
cimport test

13 years agoenable embedded testcase in Python 3
Lisandro Dalcin [Wed, 16 Feb 2011 23:11:05 +0000 (20:11 -0300)]
enable embedded testcase in Python 3

13 years agofix makefile for embed testcase
Lisandro Dalcin [Wed, 16 Feb 2011 21:55:06 +0000 (18:55 -0300)]
fix makefile for embed testcase

13 years agoarg none check does not require arg type test utility code
Lisandro Dalcin [Tue, 15 Feb 2011 17:35:33 +0000 (14:35 -0300)]
arg none check does not require arg type test utility code

13 years agoRemove excessive refcounting.
Robert Bradshaw [Tue, 15 Feb 2011 10:15:55 +0000 (02:15 -0800)]
Remove excessive refcounting.

13 years agometa data update in setup.py
Stefan Behnel [Sun, 13 Feb 2011 06:58:23 +0000 (07:58 +0100)]
meta data update in setup.py

13 years agoPy2.7/3.1 add a new field to Py_buffer
Stefan Behnel [Sat, 12 Feb 2011 12:50:36 +0000 (13:50 +0100)]
Py2.7/3.1 add a new field to Py_buffer

13 years agoC-arrays of uchar/schar are also C strings
Stefan Behnel [Sat, 12 Feb 2011 12:48:43 +0000 (13:48 +0100)]
C-arrays of uchar/schar are also C strings

13 years agoWindows: fixes for previous commit
Lisandro Dalcin [Fri, 11 Feb 2011 14:14:19 +0000 (11:14 -0300)]
Windows: fixes for previous commit

13 years agoWindows: add -Wno-format to CFLAGS when using MinGW
Lisandro Dalcin [Fri, 11 Feb 2011 01:26:19 +0000 (22:26 -0300)]
Windows: add -Wno-format to CFLAGS when using MinGW

13 years agoadd --compiler option to runtests.py (mainly for MSVC/MinGW)
Lisandro Dalcin [Fri, 11 Feb 2011 00:59:01 +0000 (21:59 -0300)]
add --compiler option to runtests.py (mainly for MSVC/MinGW)

13 years agoPython 3.2 now uses new C integral type Py_hash_t
Lisandro Dalcin [Wed, 9 Feb 2011 16:49:22 +0000 (13:49 -0300)]
Python 3.2 now uses new C integral type Py_hash_t

13 years agoattempt to silent spurious MinGW warnigns
Lisandro Dalcin [Wed, 9 Feb 2011 15:16:08 +0000 (12:16 -0300)]
attempt to silent spurious MinGW warnigns

13 years agofix declaration in testcase helper header
Lisandro Dalcin [Wed, 9 Feb 2011 14:58:33 +0000 (11:58 -0300)]
fix declaration in testcase helper header

13 years agoWindows: fix testcase failing to link
Lisandro Dalcin [Wed, 9 Feb 2011 14:50:24 +0000 (11:50 -0300)]
Windows: fix testcase failing to link

13 years agoWindows: fix testcase to not link libm
Lisandro Dalcin [Mon, 7 Feb 2011 22:10:24 +0000 (19:10 -0300)]
Windows: fix testcase to not link libm

13 years agoattempt to fix rmtree Windows issues in test case
Lisandro Dalcin [Mon, 7 Feb 2011 20:14:07 +0000 (17:14 -0300)]
attempt to fix rmtree Windows issues in test case

13 years agoInline: -Wno-unused is a GCC flag, some but not all compilers out there support it
Lisandro Dalcin [Mon, 7 Feb 2011 19:27:51 +0000 (16:27 -0300)]
Inline: -Wno-unused is a GCC flag, some but not all compilers out there support it

13 years agoincrease version number
Stefan Behnel [Sun, 6 Feb 2011 15:21:37 +0000 (16:21 +0100)]
increase version number

13 years agowhen indexing/slicing 'str', it's safe to infer 'str' for the result
Stefan Behnel [Sun, 6 Feb 2011 15:14:48 +0000 (16:14 +0100)]
when indexing/slicing 'str', it's safe to infer 'str' for the result

13 years agowhen indexing 'str', it's safe to infer 'str' for the result
Stefan Behnel [Sun, 6 Feb 2011 15:07:39 +0000 (16:07 +0100)]
when indexing 'str', it's safe to infer 'str' for the result

13 years agofix test after changing type inference for unicode indexing
Stefan Behnel [Sun, 6 Feb 2011 09:14:01 +0000 (10:14 +0100)]
fix test after changing type inference for unicode indexing

13 years agofor indexing into / looping over unicode strings, infer Py_UCS4 instead of Py_UNICODE
Stefan Behnel [Sun, 6 Feb 2011 08:59:26 +0000 (09:59 +0100)]
for indexing into / looping over unicode strings, infer Py_UCS4 instead of Py_UNICODE

13 years agoerror handling fixes for argument unpacking when args/kwargs are in closures
Stefan Behnel [Sat, 5 Feb 2011 18:21:47 +0000 (19:21 +0100)]
error handling fixes for argument unpacking when args/kwargs are in closures

13 years agofix debugging test skipping for older Python versions
Stefan Behnel [Sat, 5 Feb 2011 17:19:48 +0000 (18:19 +0100)]
fix debugging test skipping for older Python versions

13 years agofix unused imports and Py2.4-isms in test code
Stefan Behnel [Sat, 5 Feb 2011 16:56:27 +0000 (17:56 +0100)]
fix unused imports and Py2.4-isms in test code

13 years agofix Py2.5-isms in test code
Stefan Behnel [Sat, 5 Feb 2011 16:46:22 +0000 (17:46 +0100)]
fix Py2.5-isms in test code

13 years agofix error test case
Stefan Behnel [Sat, 5 Feb 2011 16:41:31 +0000 (17:41 +0100)]
fix error test case

13 years agosupport 'Py_UCS4 in unicode_string' also in 16 Unicode builds
Stefan Behnel [Sat, 5 Feb 2011 16:24:44 +0000 (17:24 +0100)]
support 'Py_UCS4 in unicode_string' also in 16 Unicode builds

13 years agofix surrogate pair calculation
Stefan Behnel [Sat, 5 Feb 2011 16:16:06 +0000 (17:16 +0100)]
fix surrogate pair calculation

13 years agoin Py3.2, the unicode character testing/conversion functions accept Py_UCS4 instead...
Stefan Behnel [Sat, 5 Feb 2011 14:49:36 +0000 (15:49 +0100)]
in Py3.2, the unicode character testing/conversion functions accept Py_UCS4 instead of Py_UNICODE

13 years agoMerge branch 'release 0.14.1'
Robert Bradshaw [Fri, 4 Feb 2011 10:53:06 +0000 (02:53 -0800)]
Merge branch 'release 0.14.1'

Conflicts:
Cython/__init__.py

13 years agoBump version number. 0.14.1
Robert Bradshaw [Fri, 4 Feb 2011 10:30:48 +0000 (02:30 -0800)]
Bump version number.

13 years agoMake unit tests testable from any directory.
Robert Bradshaw [Fri, 4 Feb 2011 10:30:10 +0000 (02:30 -0800)]
Make unit tests testable from any directory.

13 years agoAllow exclusion of end-to-end tests.
Robert Bradshaw [Fri, 4 Feb 2011 10:12:04 +0000 (02:12 -0800)]
Allow exclusion of end-to-end tests.

13 years agoRuntest cleanup for different testing environments.
Robert Bradshaw [Fri, 4 Feb 2011 09:16:05 +0000 (01:16 -0800)]
Runtest cleanup for different testing environments.

13 years agoMove windows distutils hack to the correct place.
Robert Bradshaw [Sun, 30 Jan 2011 11:03:36 +0000 (03:03 -0800)]
Move windows distutils hack to the correct place.

13 years agofix isinstance() check against a tuple of extension types
Stefan Behnel [Sat, 29 Jan 2011 05:37:09 +0000 (06:37 +0100)]
fix isinstance() check against a tuple of extension types

13 years agoDebugger: made test less verbose (#645)
Mark Florisson [Fri, 28 Jan 2011 12:18:57 +0000 (13:18 +0100)]
Debugger: made test less verbose (#645)

13 years agoBump version number.
Robert Bradshaw [Fri, 28 Jan 2011 10:36:29 +0000 (02:36 -0800)]
Bump version number.

13 years agoconfigurable working and root dir
Robert Bradshaw [Fri, 28 Jan 2011 10:31:30 +0000 (02:31 -0800)]
configurable working and root dir

13 years agoRestore cwd if debugger setUp() fails (to avoid breaking later tests).
Robert Bradshaw [Fri, 28 Jan 2011 09:29:58 +0000 (01:29 -0800)]
Restore cwd if debugger setUp() fails (to avoid breaking later tests).

13 years agoWindows runtests.py hack.
Robert Bradshaw [Fri, 28 Jan 2011 08:55:45 +0000 (00:55 -0800)]
Windows runtests.py hack.

13 years agoAvoid more gdb errors for insufficient gdb.
Robert Bradshaw [Fri, 28 Jan 2011 08:19:24 +0000 (00:19 -0800)]
Avoid more gdb errors for insufficient gdb.

13 years agocleanup
Stefan Behnel [Mon, 31 Jan 2011 14:16:52 +0000 (15:16 +0100)]
cleanup

13 years agocache constant 'slice' instances
Stefan Behnel [Mon, 31 Jan 2011 11:46:39 +0000 (12:46 +0100)]
cache constant 'slice' instances

13 years agofix constant_result of SliceNode
Stefan Behnel [Mon, 31 Jan 2011 11:41:58 +0000 (12:41 +0100)]
fix constant_result of SliceNode

13 years agosupport surrogate pair to Py_UCS4 coercion only in 16 bit Unicode builds
Stefan Behnel [Mon, 31 Jan 2011 07:56:52 +0000 (08:56 +0100)]
support surrogate pair to Py_UCS4 coercion only in 16 bit Unicode builds

13 years agoMerge branch 'release2'
Robert Bradshaw [Sun, 30 Jan 2011 11:04:00 +0000 (03:04 -0800)]
Merge branch 'release2'

13 years agoMove windows distutils hack to the correct place.
Robert Bradshaw [Sun, 30 Jan 2011 11:03:36 +0000 (03:03 -0800)]
Move windows distutils hack to the correct place.

13 years agotest fix
Stefan Behnel [Sat, 29 Jan 2011 20:40:37 +0000 (21:40 +0100)]
test fix

13 years agoerror test fixes
Stefan Behnel [Sat, 29 Jan 2011 17:46:44 +0000 (18:46 +0100)]
error test fixes

13 years agoimplemented Py_UCS4 type
Stefan Behnel [Sat, 29 Jan 2011 17:35:53 +0000 (18:35 +0100)]
implemented Py_UCS4 type

--HG--
rename : tests/errors/py_unicode_type_errors.pyx => tests/errors/py_ucs4_type_errors.pyx
rename : tests/run/py_unicode_type.pyx => tests/run/py_ucs4_type.pyx

13 years agofix isinstance() check against a tuple of extension types
Stefan Behnel [Sat, 29 Jan 2011 05:37:09 +0000 (06:37 +0100)]
fix isinstance() check against a tuple of extension types

13 years agoAllow extern "functions" (e.g. macros) to return array types.
Robert Bradshaw [Sat, 29 Jan 2011 09:25:51 +0000 (01:25 -0800)]
Allow extern "functions" (e.g. macros) to return array types.

13 years agomerge
Stefan Behnel [Sat, 29 Jan 2011 08:55:04 +0000 (09:55 +0100)]
merge

13 years agofix isinstance() check against a tuple of extension types
Stefan Behnel [Sat, 29 Jan 2011 05:37:09 +0000 (06:37 +0100)]
fix isinstance() check against a tuple of extension types

13 years agovarargs tempification needs to be done for all varargs, not only Python objects
Stefan Behnel [Sat, 29 Jan 2011 08:50:02 +0000 (09:50 +0100)]
varargs tempification needs to be done for all varargs, not only Python objects

13 years agofunction argument temping algorithm is smart enough now to no longer require all...
Stefan Behnel [Sat, 29 Jan 2011 08:28:35 +0000 (09:28 +0100)]
function argument temping algorithm is smart enough now to no longer require all arguments to be simple regardless; varargs need to be temp-ed as well

13 years agofix isinstance() check against a tuple of extension types
Stefan Behnel [Sat, 29 Jan 2011 05:37:09 +0000 (06:37 +0100)]
fix isinstance() check against a tuple of extension types

13 years agolast call argument doesn't need to be simple, so don't force it into a temp
Stefan Behnel [Fri, 28 Jan 2011 21:15:23 +0000 (22:15 +0100)]
last call argument doesn't need to be simple, so don't force it into a temp

13 years agowhen deciding if function argument must be moved into temps, ignore if the first...
Stefan Behnel [Fri, 28 Jan 2011 21:06:49 +0000 (22:06 +0100)]
when deciding if function argument must be moved into temps, ignore if the first argument is a temp as it will be evaluated first anyway

13 years agofix IndexNode.is_simple() for buffer access
Stefan Behnel [Fri, 28 Jan 2011 18:04:49 +0000 (19:04 +0100)]
fix IndexNode.is_simple() for buffer access

13 years agofix Py2.7 warning
Stefan Behnel [Fri, 28 Jan 2011 17:51:33 +0000 (18:51 +0100)]
fix Py2.7 warning

13 years agoindexing a C ptr/array is 'simple'
Stefan Behnel [Fri, 28 Jan 2011 17:47:29 +0000 (18:47 +0100)]
indexing a C ptr/array is 'simple'

13 years agoDebugger: made test less verbose (#645)
Mark Florisson [Fri, 28 Jan 2011 12:18:57 +0000 (13:18 +0100)]
Debugger: made test less verbose (#645)

13 years agoMerge branch 'release'
Robert Bradshaw [Fri, 28 Jan 2011 10:42:29 +0000 (02:42 -0800)]
Merge branch 'release'

13 years agoBump version number. 0.14.1rc3
Robert Bradshaw [Fri, 28 Jan 2011 10:36:29 +0000 (02:36 -0800)]
Bump version number.

13 years agoconfigurable working and root dir
Robert Bradshaw [Fri, 28 Jan 2011 10:31:30 +0000 (02:31 -0800)]
configurable working and root dir

13 years agoRestore cwd if debugger setUp() fails (to avoid breaking later tests).
Robert Bradshaw [Fri, 28 Jan 2011 09:29:58 +0000 (01:29 -0800)]
Restore cwd if debugger setUp() fails (to avoid breaking later tests).

13 years agoWindows runtests.py hack.
Robert Bradshaw [Fri, 28 Jan 2011 08:55:45 +0000 (00:55 -0800)]
Windows runtests.py hack.

13 years agobuild fix for the last self argument change
Stefan Behnel [Fri, 28 Jan 2011 08:35:47 +0000 (09:35 +0100)]
build fix for the last self argument change

13 years agoa method's self argument doesn't need to be in a temp when calling it
Stefan Behnel [Fri, 28 Jan 2011 08:23:28 +0000 (09:23 +0100)]
a method's self argument doesn't need to be in a temp when calling it

13 years agoAvoid more gdb errors for insufficient gdb.
Robert Bradshaw [Fri, 28 Jan 2011 08:19:24 +0000 (00:19 -0800)]
Avoid more gdb errors for insufficient gdb.

13 years agoPyTypeTestNode and NoneCheckNode are 'simple' when their argument is
Stefan Behnel [Fri, 28 Jan 2011 07:05:28 +0000 (08:05 +0100)]
PyTypeTestNode and NoneCheckNode are 'simple' when their argument is

13 years agoC type casts are 'simple'
Stefan Behnel [Fri, 28 Jan 2011 06:51:36 +0000 (07:51 +0100)]
C type casts are 'simple'