logo       

Re: Segfault when trying to set attribute of another class: msg#00021

python.pyrex

Subject: Re: Segfault when trying to set attribute of another class

Armin Bauer <armin.bauer@xxxxxxxxxxx>:

> But now i get "use of cast expressions as lvalues is deprecated"
> warnings from the generated c file from lines like this with gcc 3.3.3:
> ((PyObject*)__pyx_v_s) = Py_None; Py_INCREF(((PyObject*)__pyx_v_s));

I can see I'm going to have to do something about that
in the near future, but it'll take a redesign of the
code generator -- Pyrex currently uses these all over
the place.

In the meantime, all I can suggest is that you turn
off the warnings, or ignore them.

> > cdef CLASS1 *s # <--- note type declaration
> this line also had to be changed to cdef CLASS1 s

Yes, sorry, I wasn't quite thinking straight when I
typed that.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg@xxxxxxxxxxxxxxxxxxxxx +--------------------------------------+


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise