Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
bbb95b83
Commit
bbb95b83
authored
Sep 12, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compile UtilityCode classes into extension types, now that "__eq__()" is supported.
parent
7d505a10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
Cython/Compiler/Code.pxd
Cython/Compiler/Code.pxd
+19
-13
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+1
-1
No files found.
Cython/Compiler/Code.pxd
View file @
bbb95b83
...
...
@@ -3,19 +3,25 @@ from __future__ import absolute_import
cimport
cython
#cdef class UtilityCodeBase(object):
# cdef public object name
# cdef public object proto
# cdef public object impl
# cdef public object init
# cdef public object cleanup
# cdef public object requires
# cdef public dict _cache
# cdef public list specialize_list
# cdef public object proto_block
# cdef public object file
#
# cpdef format_code(self, code_string, replace_empty_lines=*)
cdef
class
UtilityCodeBase
(
object
):
cpdef
format_code
(
self
,
code_string
,
replace_empty_lines
=*
)
cdef
class
UtilityCode
(
UtilityCodeBase
):
cdef
public
object
name
cdef
public
object
proto
cdef
public
object
impl
cdef
public
object
init
cdef
public
object
cleanup
cdef
public
object
proto_block
cdef
public
object
requires
cdef
public
dict
_cache
cdef
public
list
specialize_list
cdef
public
object
file
cpdef
none_or_sub
(
self
,
s
,
context
)
cdef
class
FunctionState
:
cdef
public
set
names_taken
...
...
Cython/Compiler/Code.py
View file @
bbb95b83
...
...
@@ -117,7 +117,6 @@ class UtilityCodeBase(object):
"""
is_cython_utility = False
requires = None
_utility_cache = {}
@classmethod
...
...
@@ -565,6 +564,7 @@ class LazyUtilityCode(UtilityCodeBase):
available. Useful when you only have '
env
' but not '
code
'.
"""
__name__ = '
<
lazy
>
'
requires = None
def __init__(self, callback):
self.callback = callback
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment