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
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
......
......@@ -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
......
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