[Xapian-devel] GSoC 2011 - Improve Existing Bindings

Olly Betts olly at survex.com
Mon Mar 21 14:51:41 GMT 2011


On Sun, Mar 20, 2011 at 02:28:15PM +0000, James Aylett wrote:
> (in a subdirectory; there are two main files, util.i and
> extra.i; generally speaking util.i is for SWIG "typemaps", which
> convert arguments between the target language and C++, while extra.i
> is currently only used by the python bindings to inject additional
> python code, mostly to provide more idiomatic iterators).

I think the main reason for the two is that we need to include them at
different points in the interface file, but it has been a while since
I worked on the overall structure.

> As the project summary indicates, there's some default SWIG wrapping
> going on which can probably be improved. The ultimate aim is that a C#
> programmer should be able to think in a C# way when using the
> bindings.

Indeed.

One obvious think to look for: anything that gets wrapped as something
involving SWIGTYPE really needs addressing (this is a generic "don't
know what to do with this" response from SWIG for C# and Java).  But
those are certainly not the only issues to look for, just the easiest
to spot.

If the scope of improving the C# bindings seems too narrow to keep you
busy for the Summer, you could usefully look at Java too, if you're also
familiar with that.  SWIG's support for C# and Java works in very
similar ways (they were written and are maintained by the same person)
so quite a lot would be in common.

Cheers,
    Olly



More information about the Xapian-devel mailing list