[Xapian-discuss] German Danish Russian

Olly Betts olly at survex.com
Wed Sep 2 22:09:08 BST 2009


On Wed, Sep 02, 2009 at 07:49:35PM +0300, win 32 wrote:
> But this csharp/util.i doesn't even exist in the distribution.

$ tar tvf xapian-bindings-1.0.15.tar.gz|grep csharp/util.i
-rw-r--r-- olly/olly      8294 2009-08-26 22:51 xapian-bindings-1.0.15/csharp/util.i

And similarly for 1.0.0-1.0.14.

> According to the SWIG doc you had pointed me to somewhere "string"
> type should be mapped like
> 
> %typemap(imtype,
>          inattributes="[MarshalAs(UnmanagedType.CustomMarshaler,
> MarshalTypeRef = typeof(UTF8StringMarshaler))]",
>          outattributes="[return:
> MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef =
> typeof(UTF8StringMarshaler))]") const char * "string"
> 
> but I have no idea which .i - file should be modified and the details.

Exactly where it goes isn't important for SWIG, but csharp/util.i is
only included for C#, so that's the best place for C#-specific things.

If that's the right typemap, you should be able to just paste it in
as is.

> It would also make sense to define the typemap only for windows .net
> as you stated that the bindings work well for Mono.

Ah, yes.  I wouldn't worry about that part for now - either we can
generate separate wrapper sources for each case, or we can copy the
default typemap for Mono.  But that part I know how to do, so I'm
happy to sort that out.

Cheers,
    Olly



More information about the Xapian-discuss mailing list