Commit bbb95b83 authored by Stefan Behnel's avatar Stefan Behnel

Compile UtilityCode classes into extension types, now that "__eq__()" is supported.

parent 7d505a10
...@@ -3,19 +3,25 @@ from __future__ import absolute_import ...@@ -3,19 +3,25 @@ from __future__ import absolute_import
cimport cython cimport cython
#cdef class UtilityCodeBase(object):
# cdef public object name cdef class UtilityCodeBase(object):
# cdef public object proto cpdef format_code(self, code_string, replace_empty_lines=*)
# cdef public object impl
# cdef public object init
# cdef public object cleanup cdef class UtilityCode(UtilityCodeBase):
# cdef public object requires cdef public object name
# cdef public dict _cache cdef public object proto
# cdef public list specialize_list cdef public object impl
# cdef public object proto_block cdef public object init
# cdef public object file cdef public object cleanup
# cdef public object proto_block
# cpdef format_code(self, code_string, replace_empty_lines=*) 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 class FunctionState:
cdef public set names_taken cdef public set names_taken
......
...@@ -117,7 +117,6 @@ class UtilityCodeBase(object): ...@@ -117,7 +117,6 @@ class UtilityCodeBase(object):
""" """
is_cython_utility = False is_cython_utility = False
requires = None
_utility_cache = {} _utility_cache = {}
@classmethod @classmethod
...@@ -565,6 +564,7 @@ class LazyUtilityCode(UtilityCodeBase): ...@@ -565,6 +564,7 @@ class LazyUtilityCode(UtilityCodeBase):
available. Useful when you only have 'env' but not 'code'. available. Useful when you only have 'env' but not 'code'.
""" """
__name__ = '<lazy>' __name__ = '<lazy>'
requires = None
def __init__(self, callback): def __init__(self, callback):
self.callback = callback self.callback = callback
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment