>> Stefan Behnel wrote: ... > >>> cdef inline small_method(self, x): >>> self.y += x >>> >>> would emit a direct call to the ..._small_method(self, x) C >>> function in >>> big_method(), instead of passing through self->__pyx_vtab- >>>> small_method. >>> >>> This would require these methods to be non-overridable, which I >>> think makes >>> sense for something declared 'inline'. >>> >>> Thoughts?
This obscures the intent of the code by abusing a C keyword, just borrow the Java keyword that already has the associated semantics: cdef final small_method(self, x): ... Add an implicit inline in the C code declaration and emit the direct calls, and it does exactly what new cython users (like me) expect. _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
