Status report (July 15th)

Another week, another status update ;). Enjoy!

I have been out of Cracow for most of last week, so the progress I have made is rather limited. In the last couple of days I have worked on improving the typemaps for non-transparent objects. These are objects that SWIG does not know too much about like pointers to incomplete types and pointers to pointers. For example if you have something like this:

class A; // incomplete type
A* func1();
int** func2();

Then the return values of func1 and func2 in the IDL file will be of type SWIGTYPE_p_A* and SWIGTYPE_p_p_int* respectively. With these types you cannot do anything apart from passing them to functions expecting A* or int**. This should now be relatively bug-free and work at all times.
Another typemap-related improvement is passing arguments and returning results by value and by reference. This is done similarly as in SWIG’s Java module and works as can be expected by a C++ programmer – when an object is passed by value the function operates on a copy of the object, otherwise the object can be changed by the function.

For the next week I plan to work on constructor support – as described in a previous mail – and on creating an automated test suite. As Linux seems to be the predominant platform for SWIG development I plan to use Wine and its tools (winegcc, widl) for this.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: