[Pyrex] Re: Re: Pyrex and C++

Mike Rovner mike at nospam.com
Wed Nov 19 20:28:14 CET 2003


Greg Ewing wrote:
> Pyrex currently generates code which casts lvalues, e.g.
>
>    MyExtensionType *p;
>    (PyObject *)p = some_pyobject_expr;
>
> which is apparently illegal in C++.

It seems to be legal C++. See ISO 5.4:
"""
    The result of the expression (T) cast expression is of type T. The
result is an lvalue if T is
    a reference type, otherwise the result is an rvalue.
"""
Mike







More information about the Pyrex mailing list