Branch: refs/heads/master
Home:
https://github.com/mono/maccore
Compare:
https://github.com/mono/maccore/compare/c18d4812050c...cbf014300d8a
Commit: cbf014300d8a910f8892a46a650ed69531733261
Author: Rolf Bjarne Kvinge <
ro...@xamarin.com> (rolfbjarne)
Date: 2013-04-23 23:58:04 GMT
URL:
https://github.com/mono/maccore/commit/cbf014300d8a910f8892a46a650ed69531733261
Add support for marshalling native exceptions to Xamarin.Mac.
Changed paths:
M src/generator.cs
Modified: src/generator.cs
===================================================================
@@ -1477,9 +1477,11 @@ public bool IsTarget (ParameterInfo pi)
string MakeSig (string send, bool stret, MethodInfo mi)
{
var sb = new StringBuilder ();
-
-#if !MONOMAC
+
if (HasAttribute (mi, typeof (MarshalNativeExceptionsAttribute)))
+#if MONOMAC
+ sb.Append ("monomac_");
+#else
sb.Append ("monotouch_");
#endif
@@ -1547,7 +1549,7 @@ void RegisterMethod (bool need_stret, MethodInfo mi, string method_name)
return;
}
- if (method_name.StartsWith ("monotouch_")) {
+ if (method_name.StartsWith ("monotouch_") || method_name.StartsWith ("monomac_")) {
print (m, "\t\t[DllImport (\"__Internal\", EntryPoint=\"{0}\")]", method_name);
} else {
print (m, "\t\t[DllImport (LIBOBJC_DYLIB, EntryPoint=\"{0}\")]", entry_point);