[PyKDE] SIP: assigning None to public variable which is user defined type crashes SIP extensions.

Gerard Vermeulen gerard.vermeulen at grenoble.cnrs.fr
Sat May 28 14:44:47 BST 2005


The SIP extension for

class Double
{
public:
    Double(double v=0): value(v) {}
private:
    double value;
};

class Ball
{
public:
    Ball() {};
    double weight;
    Double radius;
};

crashes when doing

b = Ball()
b.radius = None

because in this case the statement
        sipCpp -> radius = *val;
in var_Ball_radius() dereferences the null pointer

See attachment.

Gerard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug-1.tar.gz
Type: application/x-gzip
Size: 1099 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20050528/f68f3bbb/bug-1.tar.gz


More information about the PyQt mailing list