cython.git
13 years agoMove name/cname descriptions from Ctx to Entry and remove const from Ctx.
W. Trevor King [Thu, 10 Mar 2011 13:12:04 +0000 (08:12 -0500)]
Move name/cname descriptions from Ctx to Entry and remove const from Ctx.

13 years agoUse error instead of NotImplementedError in ParseTreeTransforms.
W. Trevor King [Thu, 10 Mar 2011 13:07:51 +0000 (08:07 -0500)]
Use error instead of NotImplementedError in ParseTreeTransforms.

13 years agoAssorted changes (mostly sytlistic) to reduce differences with the master branch.
W. Trevor King [Wed, 9 Mar 2011 23:50:53 +0000 (18:50 -0500)]
Assorted changes (mostly sytlistic) to reduce differences with the master branch.

13 years agoStrip out Binding module and references.
W. Trevor King [Wed, 9 Mar 2011 22:11:30 +0000 (17:11 -0500)]
Strip out Binding module and references.

13 years agoRemove logging from Parsing.py.
W. Trevor King [Mon, 7 Mar 2011 14:46:05 +0000 (09:46 -0500)]
Remove logging from Parsing.py.

13 years agoMerge Binding.extern back into Binding.c_visibility.
W. Trevor King [Tue, 8 Mar 2011 21:42:27 +0000 (16:42 -0500)]
Merge Binding.extern back into Binding.c_visibility.

Discussions with Robert Bradshaw have convinced me that its not worth
keeping separate attributes to control extern, mangling, etc., so I'm
bundling these back together again.

13 years agoConsolidate Binding.CSource into Binding.CBinding.
W. Trevor King [Mon, 7 Mar 2011 14:43:51 +0000 (09:43 -0500)]
Consolidate Binding.CSource into Binding.CBinding.

13 years agoNormalize WTK_Entry -> Entry.
W. Trevor King [Mon, 7 Mar 2011 00:08:11 +0000 (19:08 -0500)]
Normalize WTK_Entry -> Entry.

13 years agoRemove Scope._WTK_setup.
W. Trevor King [Sun, 6 Mar 2011 22:30:36 +0000 (17:30 -0500)]
Remove Scope._WTK_setup.

13 years agoNormalize WTK_declare -> declare.
W. Trevor King [Sun, 6 Mar 2011 20:43:32 +0000 (15:43 -0500)]
Normalize WTK_declare -> declare.

13 years agoCondense all Parsing._LOG calls to single lines for easier commenting/removal.
W. Trevor King [Sun, 6 Mar 2011 20:07:31 +0000 (15:07 -0500)]
Condense all Parsing._LOG calls to single lines for easier commenting/removal.

13 years agoRemove debugging print from Scope.declare_cfunction.
W. Trevor King [Sun, 6 Mar 2011 17:31:31 +0000 (12:31 -0500)]
Remove debugging print from Scope.declare_cfunction.

13 years agoNormalize WTK_declare_var -> declare_var.
W. Trevor King [Sun, 6 Mar 2011 17:30:46 +0000 (12:30 -0500)]
Normalize WTK_declare_var -> declare_var.

13 years agoNormalize WTK_declare_cfunction -> declare_cfunction.
W. Trevor King [Sun, 6 Mar 2011 04:17:25 +0000 (23:17 -0500)]
Normalize WTK_declare_cfunction -> declare_cfunction.

13 years agoNormalize WTK_declare_c_class -> declare_c_class.
W. Trevor King [Sun, 6 Mar 2011 03:12:44 +0000 (22:12 -0500)]
Normalize WTK_declare_c_class -> declare_c_class.

13 years agoNormalize WTK_declare_typedef -> declare_typedef.
W. Trevor King [Sun, 6 Mar 2011 03:08:48 +0000 (22:08 -0500)]
Normalize WTK_declare_typedef -> declare_typedef.

13 years agoNormalize WTK_declare_struct_or_union -> declare_struct_or_union.
W. Trevor King [Sun, 6 Mar 2011 03:04:15 +0000 (22:04 -0500)]
Normalize WTK_declare_struct_or_union -> declare_struct_or_union.

13 years agoNormalize WTK_declare_builtin_type -> declare_builtin_type.
W. Trevor King [Fri, 4 Mar 2011 17:11:09 +0000 (12:11 -0500)]
Normalize WTK_declare_builtin_type -> declare_builtin_type.

13 years agoNormalize WTK_declare_builtin_cfunction -> declare_builtin_cfunction.
W. Trevor King [Fri, 4 Mar 2011 03:52:20 +0000 (22:52 -0500)]
Normalize WTK_declare_builtin_cfunction -> declare_builtin_cfunction.

13 years agoNormalize WTK_declare_builtin -> declare_builtin.
W. Trevor King [Fri, 4 Mar 2011 03:27:28 +0000 (22:27 -0500)]
Normalize WTK_declare_builtin -> declare_builtin.

13 years agoNormalize WTK_declare_lambda_function -> declare_lambda_function.
W. Trevor King [Fri, 4 Mar 2011 02:36:27 +0000 (21:36 -0500)]
Normalize WTK_declare_lambda_function -> declare_lambda_function.

13 years agoNormalize WTK_declare_pyfunction -> declare_pyfunction.
W. Trevor King [Fri, 4 Mar 2011 01:59:47 +0000 (20:59 -0500)]
Normalize WTK_declare_pyfunction -> declare_pyfunction.

13 years agoSecond round of WTK_ form normalization.
W. Trevor King [Thu, 3 Mar 2011 22:09:29 +0000 (17:09 -0500)]
Second round of WTK_ form normalization.

This round removes the old interfaces to the following methods:
* declare_enum
* _declare_pyfunction
* add_imported_entry
* declare_module
* declare_arg
* declare_property

13 years agoFirst round of WTK_ form normalization.
W. Trevor King [Thu, 3 Mar 2011 21:44:08 +0000 (16:44 -0500)]
First round of WTK_ form normalization.

This round removes the old interfaces to the following methods:
* declare_const
* declare_type
* declare_cpp_class
* _check_previous_visibility
* check_previous_visibility
* add_cfunction

13 years agoUse explicit visibilities in CClassScope initialization.
W. Trevor King [Thu, 3 Mar 2011 21:15:59 +0000 (16:15 -0500)]
Use explicit visibilities in CClassScope initialization.

13 years agoUse explicit visibilities in C(pp)ClassScope cfunction declaration.
W. Trevor King [Thu, 3 Mar 2011 20:32:52 +0000 (15:32 -0500)]
Use explicit visibilities in C(pp)ClassScope cfunction declaration.

13 years agoMerge branch 'master' into cdef-enums-stucts-and-unions
W. Trevor King [Thu, 3 Mar 2011 17:51:55 +0000 (12:51 -0500)]
Merge branch 'master' into cdef-enums-stucts-and-unions

Conflicts:
Cython/Compiler/Nodes.py
Cython/Compiler/Symtab.py

13 years agoUse explicit visibilities in typedef declaration in SingleAssignmentNode.analyse_decl...
W. Trevor King [Thu, 3 Mar 2011 15:13:30 +0000 (10:13 -0500)]
Use explicit visibilities in typedef declaration in SingleAssignmentNode.analyse_declarations().

13 years agoFix CClassDefNode extern setup in PyClassDefNode.as_cclass().
W. Trevor King [Thu, 3 Mar 2011 14:47:49 +0000 (09:47 -0500)]
Fix CClassDefNode extern setup in PyClassDefNode.as_cclass().

13 years agoAdd Binding.visibility_string() for composing error messages.
W. Trevor King [Thu, 3 Mar 2011 14:33:55 +0000 (09:33 -0500)]
Add Binding.visibility_string() for composing error messages.

13 years agoConvert CClassDefNode to use explicit visibilities.
W. Trevor King [Thu, 3 Mar 2011 13:55:15 +0000 (08:55 -0500)]
Convert CClassDefNode to use explicit visibilities.

13 years agoConvert CTypeDefNode to use explicit visibilities.
W. Trevor King [Thu, 3 Mar 2011 13:28:17 +0000 (08:28 -0500)]
Convert CTypeDefNode to use explicit visibilities.

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 agoAllow pointer target in C array slice iteration to avoid expensive copying.
Robert Bradshaw [Thu, 3 Mar 2011 04:23:08 +0000 (20:23 -0800)]
Allow pointer target in C array slice iteration to avoid expensive copying.

13 years agoTest for struct pointer loop.
Robert Bradshaw [Thu, 3 Mar 2011 03:42:20 +0000 (19:42 -0800)]
Test for struct pointer loop.

13 years agoFix #663 - type inference for sliced complex pointers.
Robert Bradshaw [Thu, 3 Mar 2011 03:35:00 +0000 (19:35 -0800)]
Fix #663 - type inference for sliced complex pointers.

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 agofix special methods testcase for previous changes to __ipow__
Lisandro Dalcin [Wed, 2 Mar 2011 20:08:40 +0000 (17:08 -0300)]
fix special methods testcase for previous changes to __ipow__

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 agoDocumentation cleanup.
Robert Bradshaw [Tue, 1 Mar 2011 08:03:40 +0000 (00:03 -0800)]
Documentation cleanup.

13 years agoSimplify and enhance struct/union wrapping.
Robert Bradshaw [Sun, 27 Feb 2011 07:55:14 +0000 (23:55 -0800)]
Simplify and enhance struct/union wrapping.

13 years agoFirst pass at struct wrappers.
Robert Bradshaw [Sat, 26 Feb 2011 17:50:04 +0000 (09:50 -0800)]
First pass at struct wrappers.

13 years agoCLeanup Options.py
Robert Bradshaw [Sat, 26 Feb 2011 07:24:27 +0000 (23:24 -0800)]
CLeanup Options.py

13 years agobetter sdist, use command for generating gitrev
Lisandro Dalcin [Fri, 25 Feb 2011 20:51:32 +0000 (17:51 -0300)]
better sdist, use command for generating gitrev

13 years agomerge
Stefan Behnel [Fri, 25 Feb 2011 20:10:22 +0000 (21:10 +0100)]
merge

13 years agoenable test for ticket #562
Lisandro Dalcin [Fri, 25 Feb 2011 20:05:58 +0000 (17:05 -0300)]
enable test for ticket #562

13 years agofix ticket #562
Lisandro Dalcin [Fri, 25 Feb 2011 20:03:46 +0000 (17:03 -0300)]
fix ticket #562

13 years agofixes and cleanups in __Pyx_main()
Lisandro Dalcin [Fri, 25 Feb 2011 16:13:37 +0000 (13:13 -0300)]
fixes and cleanups in __Pyx_main()

13 years agofixes and cleanups in __Pyx_main()
Lisandro Dalcin [Fri, 25 Feb 2011 16:00:00 +0000 (13:00 -0300)]
fixes and cleanups in __Pyx_main()

13 years agoAnnotate by default if there is an existing annotation.
Robert Bradshaw [Fri, 25 Feb 2011 06:45:02 +0000 (22:45 -0800)]
Annotate by default if there is an existing annotation.

13 years agoMore temp arg assignment avoidance.
Robert Bradshaw [Fri, 25 Feb 2011 06:27:31 +0000 (22:27 -0800)]
More temp arg assignment avoidance.

13 years agoOne more side effect we want to avoid in argument ordering.
Robert Bradshaw [Fri, 25 Feb 2011 06:04:26 +0000 (22:04 -0800)]
One more side effect we want to avoid in argument ordering.

13 years agoFix make repo.
Robert Bradshaw [Fri, 25 Feb 2011 05:01:58 +0000 (21:01 -0800)]
Fix make repo.

13 years agoFix hg/git in readme.
Robert Bradshaw [Fri, 25 Feb 2011 01:54:25 +0000 (17:54 -0800)]
Fix hg/git in readme.

13 years agofix building sdist without git
Stefan Behnel [Thu, 24 Feb 2011 19:19:22 +0000 (20:19 +0100)]
fix building sdist without git

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 agonogil for functions in locale.pxd and math.pxd
Lisandro Dalcin [Thu, 24 Feb 2011 16:49:52 +0000 (13:49 -0300)]
nogil for functions in locale.pxd and math.pxd

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 agoeven better __Pyx_check_binary_version()
Lisandro Dalcin [Wed, 23 Feb 2011 15:14:01 +0000 (12:14 -0300)]
even better __Pyx_check_binary_version()

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 agofix builtin hasattr() to suppress only AttributeError exceptions
Lisandro Dalcin [Wed, 23 Feb 2011 00:57:11 +0000 (21:57 -0300)]
fix builtin hasattr() to suppress only AttributeError exceptions

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 agobetter __Pyx_check_binary_version()
Lisandro Dalcin [Sun, 20 Feb 2011 21:34:11 +0000 (18:34 -0300)]
better __Pyx_check_binary_version()

13 years agoquick fix previous commit (PySys_GetObject() returns borrowed ref)
Lisandro Dalcin [Sun, 20 Feb 2011 20:52:04 +0000 (17:52 -0300)]
quick fix previous commit (PySys_GetObject() returns borrowed ref)

13 years agoquick fix previous commit (declarations after code)
Lisandro Dalcin [Sun, 20 Feb 2011 20:43:33 +0000 (17:43 -0300)]
quick fix previous commit (declarations after code)

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 agoComplile/runtime version mismatch warning.
Robert Bradshaw [Sat, 19 Feb 2011 23:12:51 +0000 (15:12 -0800)]
Complile/runtime version mismatch warning.

13 years agoMake cpp redeclaration an error (vs. a compiler crash). Fixes #523.
Robert Bradshaw [Sat, 19 Feb 2011 22:24:57 +0000 (14:24 -0800)]
Make cpp redeclaration an error (vs. a compiler crash). Fixes #523.

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 agoMerge branch 'master' of git://github.com/cython/cython
Robert Bradshaw [Fri, 18 Feb 2011 21:40:41 +0000 (13:40 -0800)]
Merge branch 'master' of git://github.com/cython/cython

13 years agodel test and assignment fix
Robert Bradshaw [Fri, 18 Feb 2011 21:39:37 +0000 (13:39 -0800)]
del test and assignment fix

13 years agofix inline textcase to not use default $HOME/.cython/inline
Lisandro Dalcin [Fri, 18 Feb 2011 21:30:11 +0000 (18:30 -0300)]
fix inline textcase to not use default $HOME/.cython/inline

13 years agoEmulate del with set to None.
Robert Bradshaw [Fri, 18 Feb 2011 21:13:41 +0000 (13:13 -0800)]
Emulate del with set to None.

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 agofix testcases assuming char is signed (thanks to Yaroslav Halchenko)
Lisandro Dalcin [Fri, 18 Feb 2011 19:11:11 +0000 (16:11 -0300)]
fix testcases assuming char is signed (thanks to Yaroslav Halchenko)

13 years agoPython 3: fix NumPy support
Lisandro Dalcin [Fri, 18 Feb 2011 16:00:03 +0000 (13:00 -0300)]
Python 3: fix NumPy support

13 years agomore declarations in math.pxd
Stefan Behnel [Fri, 18 Feb 2011 07:13:29 +0000 (08:13 +0100)]
more declarations in math.pxd

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