Author: spouliot Date: 2008-02-16 17:00:51 -0500 (Sat, 16 Feb 2008) New Revision: 95933
Modified: trunk/mono-tools/gendarme/rules/Gendarme.Rules.Interoperability/ChangeLog trunk/mono-tools/gendarme/rules/Gendarme.Rules.Interoperability/GetLastErrorMustBeCalledRightAfterPInvokeRule.cs Log: 2008-02-16 Sebastien Pouliot <[EMAIL PROTECTED]> * GetLastErrorMustBeCalledRightAfterPInvokeRule.cs: Fix the case where the p/invoke is inside another assembly using the AssemblyResolver. Modified: trunk/mono-tools/gendarme/rules/Gendarme.Rules.Interoperability/ChangeLog =================================================================== --- trunk/mono-tools/gendarme/rules/Gendarme.Rules.Interoperability/ChangeLog 2008-02-16 21:59:20 UTC (rev 95932) +++ trunk/mono-tools/gendarme/rules/Gendarme.Rules.Interoperability/ChangeLog 2008-02-16 22:00:51 UTC (rev 95933) @@ -1,3 +1,9 @@ +2008-02-16 Sebastien Pouliot <[EMAIL PROTECTED]> + + * GetLastErrorMustBeCalledRightAfterPInvokeRule.cs: Fix the case + where the p/invoke is inside another assembly using the + AssemblyResolver. + 2008-02-15 Sebastien Pouliot <[EMAIL PROTECTED]> * GetLastErrorMustBeCalledRightAfterPInvokeRule.cs Modified: trunk/mono-tools/gendarme/rules/Gendarme.Rules.Interoperability/GetLastErrorMustBeCalledRightAfterPInvokeRule.cs =================================================================== --- trunk/mono-tools/gendarme/rules/Gendarme.Rules.Interoperability/GetLastErrorMustBeCalledRightAfterPInvokeRule.cs 2008-02-16 21:59:20 UTC (rev 95932) +++ trunk/mono-tools/gendarme/rules/Gendarme.Rules.Interoperability/GetLastErrorMustBeCalledRightAfterPInvokeRule.cs 2008-02-16 22:00:51 UTC (rev 95933) @@ -146,9 +146,7 @@ if (ins.Next == null) break; - MethodDefinition pinvoke = ins.Operand as MethodDefinition; - // FIXME: calls to external PInvoke methods are ignored (requires AssemblyResolver) - // but since p/invoke should not be visible this is not a big issue + MethodDefinition pinvoke = (ins.Operand as MethodReference).Resolve (); if (pinvoke == null) break; _______________________________________________ Mono-patches maillist - Mono-patches@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-patches