python interface: also convert first argument to correct type
commit3a637dd3b2f2fd2698b98aaf3e1ac899614fb01e
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 27 Sep 2013 16:24:54 +0000 (27 18:24 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 18 Oct 2013 13:23:06 +0000 (18 15:23 +0200)
tree6bcbba3573a47863c67e4b64fc4d3102f258e804
parent72dd583bad9b19e913dc0fa868bad4ef9d70add7
python interface: also convert first argument to correct type

If a method is invoked on an object of a class that does not
override the method defined by a superclass, then the method
of the superclass method will be invoked on a reference to a
C object that corresponds to the subclass.  This object then
also needs to be explicitly converted to the superclass just
like any other argument of the method.

In particular, the foreach_set method of union_set is not
overriden by set and therefore may get called on an object
that is actually of type set.

Reported-by: Armin Größlinger <armin.groesslinger@uni-passau.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
interface/python.cc