diff --git a/configure.ac.in b/configure.ac.in index c9330aa..261d19d 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -14,7 +14,7 @@ if test "x$MONO" = "xno" ; then AC_PATH_PROG(CSC, csc.exe) else using_mono=yes - AC_PATH_PROG(CSC, gmcs) + AC_PATH_PROG(CSC, mcs) fi AM_CONDITIONAL(USING_MONO, [test $using_mono = yes]) AC_PATH_PROG(GACUTIL, gacutil, no) diff --git a/generator/CallbackGen.cs b/generator/CallbackGen.cs index a30cfa5..db231d9 100644 --- a/generator/CallbackGen.cs +++ b/generator/CallbackGen.cs @@ -201,7 +201,7 @@ public string GenWrapper (GenerationInfo gen_info) sw.WriteLine ("\tusing System.Runtime.InteropServices;"); sw.WriteLine (); sw.WriteLine ("#region Autogenerated code"); - sw.WriteLine ("\t[GLib.CDeclCallback]"); + sw.WriteLine ("\t[UnmanagedFunctionPointer (CallingConvention.Cdecl)]"); sw.WriteLine ("\tinternal delegate " + retval.MarshalType + " " + wrapper + "(" + parms.ImportSignature + ");"); sw.WriteLine (); GenInvoker (gen_info, sw); diff --git a/generator/Signal.cs b/generator/Signal.cs index c51c109..ea6e36d 100644 --- a/generator/Signal.cs +++ b/generator/Signal.cs @@ -260,7 +260,7 @@ public void GenCallback (StreamWriter sw) if (IsEventHandler) return; - sw.WriteLine ("\t\t[GLib.CDeclCallback]"); + sw.WriteLine ("\t\t[UnmanagedFunctionPointer (CallingConvention.Cdecl)]"); sw.WriteLine ("\t\tdelegate " + retval.ToNativeType + " " + DelegateName + " (" + CallbackSig + ", IntPtr gch);"); sw.WriteLine (); sw.WriteLine ("\t\tstatic " + retval.ToNativeType + " " + CallbackName + " (" + CallbackSig + ", IntPtr gch)"); @@ -488,7 +488,7 @@ private void GenDefaultHandlerDelegate (GenerationInfo gen_info, ClassBase imple bool use_glue = gen_info.GlueEnabled && implementor == null && ClassFieldName.Length > 0; string glue_name = String.Empty; ManagedCallString call = new ManagedCallString (parms, true); - sw.WriteLine ("\t\t[GLib.CDeclCallback]"); + sw.WriteLine ("\t\t[UnmanagedFunctionPointer (CallingConvention.Cdecl)]"); sw.WriteLine ("\t\tdelegate " + retval.ToNativeType + " " + Name + "VMDelegate (" + parms.ImportSignature + ");\n"); if (use_glue) { diff --git a/generator/VirtualMethod.cs b/generator/VirtualMethod.cs index 8c09704..c66045b 100644 --- a/generator/VirtualMethod.cs +++ b/generator/VirtualMethod.cs @@ -79,7 +79,7 @@ public void GenerateCallback (StreamWriter sw) else if (IsSetter) call_string = "__obj." + Name.Substring (3) + " = " + call; - sw.WriteLine ("\t\t[GLib.CDeclCallback]"); + sw.WriteLine ("\t\t[UnmanagedFunctionPointer (CallingConvention.Cdecl)]"); sw.WriteLine ("\t\tdelegate " + MarshalReturnType + " " + Name + "Delegate (" + parms.ImportSignature + ");"); sw.WriteLine (); sw.WriteLine ("\t\tstatic " + MarshalReturnType + " " + Name + "Callback (" + parms.ImportSignature + ")"); diff --git a/gio/FileEnumerator.custom b/gio/FileEnumerator.custom index 4c8001a..7a7aa4b 100644 --- a/gio/FileEnumerator.custom +++ b/gio/FileEnumerator.custom @@ -63,3 +63,11 @@ class Enumerator : IEnumerator throw new NotImplementedException (); } } + +public override void Dispose () +{ + if (!IsClosed) { + Close (null); + } + base.Dispose (); +}