logo       

Re: mh, it's acting up.: msg#00156

programming.swig

Subject: Re: mh, it's acting up.

The best way to find the problem is try
to write a small example that reproduce
your error.

But, if the class in question is "incomplete",
or defined in another module, sometimes
you need to add

%types(PhidgetQuadServo*);

to be sure swig is adding the type properly.

See the documentation about %types.

Marcelo



Martin F Krafft wrote:

Mh, Swig doesn't seem to like me...

I have a function

PhidgetQuadServo* phidget_new_PhidgetQuadServo();

and when I call it from Swig, it returns:

<C PhidgetQuadServo instance at _10c21b08_p_PhidgetQuadServo>

I also have a function

phidget_return phidget_quadservo_open(PhidgetQuadServo* const qsc,
unsigned int serial, unsigned short retries);

And when I simply pass the object obtained from the *_new_*
function, Python barks at me:

Traceback (most recent call last):
File "./test", line 18, in ?
ret = phidget_quadservo_open(qsc, 1493, 3)
TypeError: Type error. Expected _p_PhidgetQuadServo

... but qsc is a _10c21b08_p_PhidgetQuadServo, that should be the
same as a _p_PhidgetQuadServo, no?

What's going on?

Thanks,



_______________________________________________
Swig maillist - Swig@xxxxxxxxxxxxxxx
http://mailman.cs.uchicago.edu/mailman/listinfo/swig



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

News | FAQ | advertise