summaryrefslogtreecommitdiff
path: root/Cython/Compiler/UtilityCode.py
Commit message (Collapse)AuthorAgeFilesLines
* Improve "cpdef enum" to Python conversion (GH-4877)da-woods2023-01-101-0/+7
| | | | | | | | | | | | Return the Python enum instead of an int. Also, use flag enums as wrapper since they behave more like C enums in that they allow or-combination. The one corner-case that isn't perfect is cpdef enums declared in a standalone pxd file - they don't actually ever generate the python wrapper. I've made these emit a warning and return an int (which I think is a reasonable solution for the moment). Closes https://github.com/cython/cython/issues/2732 Closes https://github.com/cython/cython/issues/4633
* Prevent C++ coercions from picking up user-set directives (GH-4206)da-woods2021-07-201-0/+21
| | | | For example, if they're called on entry/exit to a decorated function they pick up the directives. They should really be independent of most user defined settings, especially local ones.
* Avoid the terms whitelist and blacklist.Robert Bradshaw2020-12-181-2/+2
| | | | | Though pretty standard, I can see how the use of these terms could reasonably be viewed as offensive.
* Fix many indentation and whitespace issues throughout the code base (GH-3673)scoder2020-06-101-1/+1
| | | … and enforce them with pycodestyle.
* Fix a typo that prevented UtilityCode.get_tree(entries_only=True) from ↵Stefan Behnel2020-04-291-1/+1
| | | | working as expected. It looks like this doesn't make a difference for the generated C code (at least for the pickling, C++ STL and memoryview tests), but it should reduce the time it takes to collect the symtab entries defined in the tree.
* Compile C++ Cython utility code in a C++ context.Stefan Behnel2018-03-111-5/+5
|
* Do not redeclare types used in utility code specialization.Robert Bradshaw2017-06-161-1/+2
|
* Allow type objects in utility code context.Robert Bradshaw2017-06-161-0/+18
| | | | | This avoids issues of having to inject/name them (and any conversions, see e.g. Issue #1737).
* whitespaceStefan Behnel2016-03-281-2/+1
|
* minor code cleanupStefan Behnel2016-03-281-3/+3
|
* fix bug where multiple utility code dependencies could be ignored due to ↵Stefan Behnel2016-03-281-19/+15
| | | | loop variable reassignment (only last one wins)
* Fix a couple of tests due to utility code changes.Robert Bradshaw2015-09-031-1/+3
|
* Make cpdef enums into first-class types.Robert Bradshaw2015-09-031-0/+11
| | | | | | | | | | | | | | For example cpdef enum Eggs SOFT HARD SCRAMBLED produces three constants with int values that print as strings, and a type Eggs with attributes Eggs.SOFT, etc. and list(Eggs) giving the set of all enum values. Instantiating Eggs with a numeric or string value will return the appropriate constant.
* make dict iteration compatible with Py2/Py3Stefan Behnel2015-07-251-1/+1
|
* prevent fallback to absolute cimport when relative cimport is not found; ↵Stefan Behnel2015-04-051-1/+3
| | | | generally clean up relative cimport code
* prevent recursively generated Cython utility code (i.e. used by other Cython ↵Stefan Behnel2014-10-251-1/+4
| | | | utility code) from appearing multiple times in the output due to a different outer module scope
* whitespaceStefan Behnel2014-10-241-1/+1
|
* Fix CythonUtilityCode equality to avoid duplication.Robert Bradshaw2014-10-121-0/+12
|
* reuse existing types/names in module for cfunc wrapping instead of ↵Stefan Behnel2014-10-111-1/+13
| | | | redeclaring them in the utility code
* reformat some codeStefan Behnel2014-10-111-9/+6
|
* make cfunc wrapper function support kwargs if the defining module wants it ↵Stefan Behnel2014-10-101-2/+4
| | | | and give it a docstring that shows the argument names
* Cleanup.Robert Bradshaw2014-10-091-1/+0
|
* Fix C warnings and C++ errors.Robert Bradshaw2014-10-091-0/+1
|
* Allow C function conversion with typedef, object, and extension arguments ↵Robert Bradshaw2014-10-081-0/+2
| | | | and return types.
* use explicit relative imports everywhere and enable absolute imports by defaultStefan Behnel2014-06-171-6/+9
|
* Better fused buffer runtime dispatch + dispatch restructuring + PyxCodeWriterMark Florisson2012-04-261-0/+8
|
* Use whitelist for declaring entries in a scopeMark Florisson2012-01-291-2/+4
|
* major cleanup refactoring of the utility code loading support,Stefan Behnel2011-11-141-1/+11
| | | | | simple support for loading requirements (at least from the same utility code type and file), caching support
* removed lots of unused imports, delayed some imports that are only needed ↵Stefan Behnel2011-11-131-2/+0
| | | | | | | for Cython specific syntax --HG-- extra : rebase_source : a2df3675fd1efae1a1122ca9742e99ab1405fba6
* cimport cython in CyUtility, more tests, nogil slicingMark Florisson2011-09-301-5/+10
|
* Support slicing memoryview slicesMark Florisson2011-09-301-1/+1
|
* Support casting pointers to cython.arrayMark Florisson2011-09-301-8/+7
|
* initializedcheck directive + uninitialized memslice checking + memoryview ↵Mark Florisson2011-09-301-1/+11
| | | | indexing object<->dtype conversion
* MemoryViewSlice indexing and object coercion + MemoryView indexingMark Florisson2011-09-301-4/+11
|
* Modify utility code loader as per discussion + testsMark Florisson2011-09-301-2/+2
|
* @cname for enum/struct in CythonUtilityCode + simple memslice indexingMark Florisson2011-09-301-1/+2
|
* Utility Code loader + memview python3 compatMark Florisson2011-09-301-1/+2
|
* Get rid of a lot of entry declarations + optional argument to not allocate ↵Mark Florisson2011-09-301-2/+2
| | | | buffer in cython.array
* Fix refnanny + test tagsMark Florisson2011-09-301-5/+14
|
* cython.memoryview implementationKurt Smith2011-09-301-1/+1
|
* Populate the cython.view module with some Python objectsDag Sverre Seljebotn2011-09-301-7/+12
|
* Delete trailing whitespacesVitja Makarov2011-07-251-1/+1
|
* used kw argument to declare_in_scopeMark Florisson2011-07-191-2/+2
|
* Support CythonUtilityCode dependencies in CythonUtilityCodeMark Florisson2011-07-191-0/+6
|
* Cython Utility Code cname extclass decorator + extmethod prototypesMark Florisson2011-07-191-6/+72
|
* Support cname() decorators in CythonUtilityCodeMark Florisson2011-07-191-28/+14
|
* Test for problem with CythonUtilityCode overwriting __test__Dag Sverre Seljebotn2011-07-191-0/+3
|
* Support utility code written in CythonDag Sverre Seljebotn2011-07-191-0/+61