toki doki, 02.07.2010 12:25: > **************************************************** > * Bug#3: > **************************************************** > cython.operator.dereference and functions returning a reference are > not recognized as l-values. > > For example, the following code: > """"" > cimport cython.operator.dereference > from libcpp.vector cimport vector > > cdef vector[int] *vect=new vector[int]() > vect.push_back(5) > vect.push_back(6) > cdef vector[int].iterator iter=vect.begin() > cython.operator.dereference(iter)=8 > """""" > gives the following error: > > """""" > cython.operator.dereference(iter)=5 > ^ > /home/toki/progs/cython13tests/bug2.pyx:8:27: Cannot assign to or delete this > """""" > > In the same way, replacing the last line by: "vect.at(0)=5" gives: > > """""" > vect.at(0)=5 > ^ > /home/toki/progs/cython13tests/bug2.pyx:7:7: Cannot assign to or delete this > """""" > > While " *iter=5 " and " vect.at(0)=5 " ares valid C++ code.
... bug not valid Cython code. If this is to be supported at all, it needs at least a different spelling. Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
