[Mono-devel-list] gtk-sharp patch for DllImport mappings

Urs Muff umuff at QUARK.com
Fri May 21 12:57:56 EDT 2004


Ok, that is a good point, so we should be more consistent then, using the
same style everywhere, since sometimes it's used as short version and
sometimes it's used as long one.

Just one side note: It probably would be easier to maintain for the future
to have something like:

public class Names
{
	public const string GLib2 = "libglib-2.0-0.dll";
}

And use it as
	[DllImport(Names.GLib2)]

So there is only one place to change it once it becomes a different
version...

I could cook a patch for that, if that is more appropriate...

- URS C. MUFF

-----Original Message-----
From: Todd Berman [mailto:tberman at sevenl.net] 
Sent: Friday, May 21, 2004 10:47 AM
To: Urs Muff
Cc: mono-devel-list at ximian.com
Subject: RE: [Mono-devel-list] gtk-sharp patch for DllImport mappings

On Fri, 2004-21-05 at 10:42 -0600, Urs Muff wrote:
> Sorry for the list mismatch, but I don't know all the lists there are.
> 
> But shouldn't that be done in the config file rather the in the DllImport
> attribute?  I don't see a reason why the DllImport attribute needs to be
> that specific.  I my opinion having glib-2.0 rather then libglib-2.0-0.dll
> in the DllImport attribute is more generic and portable.
> 

Ok, thats my point, its being done in the config file against the .dll
target already. You want to have 2 config file entries for the same
thing? And because that entry exists, it will(should) be used by mono
over whatever is originally in the DllImport. So changing it to be 'more
generic and portable' just adds an extra line to the config file that
people wanting portability will have to deal with.

Not to mention that this change would have the side-effect of making
this code no longer work on ms.net...

Which is why it is the .dll and the config mapping exists in the very
first place.

--Todd

> - URS C. MUFF
> 
> -----Original Message-----
> From: mono-devel-list-admin at lists.ximian.com
> [mailto:mono-devel-list-admin at lists.ximian.com] On Behalf Of Todd Berman
> Sent: Friday, May 21, 2004 9:44 AM
> To: Urs C Muff
> Cc: mono-devel-list at ximian.com
> Subject: Re: [Mono-devel-list] gtk-sharp patch for DllImport mappings
> 
> Urs, two things.
> 
> 1) gtk-sharp has a list for this, use it instead of here, its far lower
> traffic and much easier to track.
> 
> 2) This doesnt get rid of the need for a dll mapping on x86 in anyway.
> 
> This is because we no longer want to require the .so directly, and
> instead map to the .so.0 or equivalent that is installed without the
> -devel packages. Your patch, which removes a couple config mapping
> lines, reverts us back to requiring -devel packages.
> 
> --Todd
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list



More information about the Mono-devel-list mailing list