Hash: SHA1

Uh... I don't think so. The only large-scale change I did (which was a while ago) was to introduce empty virtual destructors in all the pure abstract interface classes, so that gcc4 wouldn't complain. But I don't see how that would confuse SWIG... Otherwise, I can't think of any API changes I've made recently.

On Fri, 30 Sep 2005, Reed Hedges wrote:

Thanks Hugh, that helps a lot.  I was confused because it seemed to happen all
of a sudden without too many changes in VOS, and the problem affects almost all
of the Python classes.  One additional thing I noticed is that this doesn't
affect the *Ptr classes, e.g. Vobject class has the raise in __init__ but
VobjectPtr doesn't.  The problem seems to affect classes that do not have common
parent classes as well (e.g. it isn't just Vobject-derived classes), but Pete,
did you change some namespace notation or the virtuality of some stuff in
Vobject or VobjectBase?


On Fri, Sep 30, 2005 at 12:27:58AM +0200, Hugh Perkins wrote:
Not all objects can be constructed, for example anything pure virtual
Swig attempts to detect which objects can and cant be constructed. Sometimes
it gets it wrong
One way in which it gets wrong are where you instantiate a method in a
derived class that was pure virtual in the base class. If the method
parameters are not textually identical, Swig gets confused. For example if
one has VOP::sometype, and the other has sometype, swig considers this as
too differentypes. Since swig considers the derived class can no longer be
constructed, you get the error below.

Theres an option on the commandline to change behavior for creatoin of
constructors, but you're probably better off diagnosing why the constructor
is not being created.

Note that this issue is a PAIN IN THE BUTT to diagnose. You might consider
rebuilding swig from scratch and getting it to pump out rather more
debugging information than it does. Otherwise look forward to a good half
hour or more of instantiating all your methods (replacing = 0 with {} ) and


On 9/28/05, Reed Hedges <[EMAIL PROTECTED]> wrote:

Hello, after about a week hiatus, I returned to a little bit of work I
was doing with Python. All of a sudden the SWIG wrapper won't work for
me and I don't know why. I may have done something to break it (I have
made a few changes to vos_swig.i etc.) but I can't figure out what. I
just updated VOS from CVS (excepting my local changes to SWIG of course).

Every proxy class in Python that Swig generates now has the following in
its __init__ definition:

def __init__(self): raise RuntimeError, "No constructor defined"

WTF? This makes it impossible to create any Python objects!


Any ideas?


vos-d mailing list

vos-d mailing list

vos-d mailing list

[   Peter Amstutz   ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED]  ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]
Version: GnuPG v1.4.1 (GNU/Linux)


vos-d mailing list

Reply via email to