Ticket #474 (closed enhancement: fixed)
support non-overridable 'inline' methods
| Reported by: | scoder | Owned by: | vitja |
|---|---|---|---|
| Priority: | major | Milestone: | 0.16 |
| Component: | Optimization | Keywords: | |
| Cc: |
Description
When a method is declared 'inline', Cython should emit calling code that bypasses the method vtable. Code like the following would thus use a direct call to the small_method C function:
cdef class MyType:
cdef list large_list
cdef size_t y
cdef big_method(self):
for x in self.large_list:
self.small_method(x)
cdef inline small_method(self, x):
self.y += x
This implies that 'inline' methods/functions are non-overridable.
Change History
Note: See
TracTickets for help on using
tickets.
