[Gtk-sharp-list] Mono.Cairo DllImport calling convention

diekleinekuh markus-henschel at gmx.de
Sun Jul 24 20:30:13 EDT 2011


Mike Kestner-2 wrote:
> 
> On Sun, Jul 24, 2011 at 3:53 PM, diekleinekuh
> <markus-henschel at gmx.de>wrote:
> 
>> Hi there,
>>
>> while tracking bug https://bugzilla.novell.com/show_bug.cgi?id=583901 I
>> tried to understand how gtksharp handles calling conventions of all the
>> native GTK functions on windows. It seems like a perl script called
>> gapi-cdecl-insert is used for that purpose. What makes me wonder is that
>> this script is not used in the makefile of cairo. What's the reason for
>> this? Is it a bug?
>>
> 
> gapi-cdecl-insert replaces GLib.CDeclCallbackAttributes with the
> appropriate
> IL.  It only applies to native callback delegates and only ones decorated
> with that attribute.
> 

Oh, Ok. So gapi-cdecl-insert is not used for cairo in 2.12 because there are
no callback delegates there?

And how are native function calls handled in 2.12 then? I didn't see any
CallingConvention set for the native PInvoke calls. Doesn't this mean stack
memory leaks on every such call on Windows where the default is stdcall? Or
does the .NET/Mono runtime take care of this by automatically balancing the
stack if it detects a leak?



> 
>> I did all my research on gtksharp 2.12 because that's the current stable
>> release version.
>>
>>
> CDeclCallbackAttribute doesn't exist in master, since we've switched to
> the
> UnmanagedFunctionPointerAttribute which is handled automatically by
> mcs/csc.
> 

Great. I really hated this script because it magically deleted pdb files for
the libraries it was used on. 

But what will be the next gtksharp version to be released? Will it be a
bugfixing release for 2.12 or something new? 


--
View this message in context: http://mono.1490590.n4.nabble.com/Mono-Cairo-DllImport-calling-convention-tp3690939p3691327.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20110724/bc7d2a25/attachment.html 


More information about the Gtk-sharp-list mailing list