Re: [Cython] [Pyrex] C++ issue

Greg Ewing <greg.ewing-F+z8Qja7x9Xokq/[email protected]>
Newsgroups gmane.comp.python.cython.devel,gmane.comp.python.pyrex
Message-ID <[email protected]>
Ravi Lanka wrote:

> cdef foo* fooPtr
> fooPtr = &(b.getFoo())
> 
> With the code above, I get "Taking address of a non-lvalue" error.

No, declare the function as though it returned
a pointer, and then use it as such.

Similarly for any function that takes a reference
as an argument -- declare it in Pyrex as taking
a pointer.

-- 
Greg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.