Problem with coerce and SWIG

J

John Fletcher

I am attempting to use coerce to be able to do calculations like

1 + x

where x is an object I have wrapped using SWIG. I use an STL vector to
return the objects to Ruby and a type mapping (typemap) within SWIG to
construct a Ruby array.

It all works fine except that the first item of the Ruby array loses its
value in the return process and Ruby receives a large integer which
looks like an address.

I have reported the full details on the SWIG list.

I am using SWIG 1.3.19 and Ruby 1.6.8.

Is this a known problem or have I found something new?

Thanks

John
 
J

John Fletcher

John said:
I am attempting to use coerce to be able to do calculations like

1 + x

where x is an object I have wrapped using SWIG. I use an STL vector to
return the objects to Ruby and a type mapping (typemap) within SWIG to
construct a Ruby array.

It all works fine except that the first item of the Ruby array loses its
value in the return process and Ruby receives a large integer which
looks like an address.

I have reported the full details on the SWIG list.

I am using SWIG 1.3.19 and Ruby 1.6.8.

Is this a known problem or have I found something new?

Thanks

John

This problem is resolved an will be reported on the SWIG list.
The solution is in a better choice of the typemap.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top