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?

Regards
Stéfan
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to