Greg Ewing wrote:
> toki doki wrote:
>   
>> we need to change
>> its definition so that dereference(foo)  produce the c++ code "
>> &(*foo) ".
>>     
>
> Isn't &(*foo) always equivalent to just foo?
>   
Not at all (in C++). * can invoke arbitrary code (operator*), which is 
used in the iterators in the standard C++ containers to denote accessing 
the value of the iterator (and an iterator is not a pointer).

So &(*it) converts from std::list<int>::iterator to an int*.

Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to