[Cython] Possible bug related to multiple assignment

Stefan Behnel stefan_ml at behnel.de
Thu Jun 16 09:46:07 CEST 2011


Andrew Collette, 16.06.2011 04:51:
> I ran into some odd behavior when working on my cython-based project
> (h5py).  The following cython code snippet is the culprit ("priv" is a
> function argument of type void**):
>
>      cdef conv_size_t *sizes
>      priv[0] = sizes =<conv_size_t*>malloc(sizeof(conv_size_t))
>
> gets turned into this (with Cython 0.14.1):
>
>      (__pyx_v_priv[0]) = ((__pyx_t_4h5py_5_conv_conv_size_t
> *)malloc((sizeof(__pyx_t_4h5py_5_conv_conv_size_t))));
>      __pyx_v_sizes = ((__pyx_t_4h5py_5_conv_conv_size_t
> *)malloc((sizeof(__pyx_t_4h5py_5_conv_conv_size_t))));

This is fixed in the latest master branch.

And, yes, we're long overdue for a release.

Stefan


More information about the cython-devel mailing list