2010/10/4 Stéfan van der Walt <[email protected]>:
> On Mon, Oct 4, 2010 at 8:24 AM, Stefan Behnel <[email protected]> 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
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to