2010/10/4 Stéfan van der Walt <ste...@sun.ac.za>: > On Mon, Oct 4, 2010 at 8:24 AM, Stefan Behnel <stefan...@behnel.de> wrote: >> That's not true for C integer types (since at least 0.12 IIRC). They >> translate to multiplication code for x**N, N<=3, and to a loop for N>3. > > This works for type "int", but not cython.int. > > Input: > > cimport cython > > def foo(cython.int x): > return x**4 > > Output: > > __pyx_t_1 = PyNumber_Power(((PyObject *)__pyx_v_x), __pyx_int_4, Py_None); > > Does `cython.int` then not point to a C int but to Python int?
Hmm... that is the case, but almost certainly not what we want, and not consistant with the other uses of cython.int. Did anyone intentionally implement this behavior? _______________________________________________ Cython-dev mailing list Cython-dev@codespeak.net http://codespeak.net/mailman/listinfo/cython-dev