Browse Source

2002-01-24 Miguel de Icaza <[email protected]>

	* StructLayoutAttribute.cs: Flag attribute as targetting structs
	or classes.

	* InAttribute.cs: Flag attribute as targettting a paramter

	* OutAttribute.cs: ditto.

	* DllImportAttribute.cs: Flag attribute as targetting methods.

	* MarshalAsAttribute.cs: Flag attribute as targetting fields,
	parameters and returnvalues.

svn path=/trunk/mcs/; revision=2146
Miguel de Icaza 24 years ago
parent
commit
fcceb7f0c4

+ 2 - 0
mcs/class/corlib/ChangeLog

@@ -1,5 +1,7 @@
 2002-01-23  Miguel de Icaza  <[email protected]>
 
+	* Unix/Errno.cs: Added
+
 	* Unix/Wrapper.cs: Updated to new Wrapper
 
 2002-01-19  Nick Drochak  <[email protected]>

+ 44 - 30
mcs/class/corlib/System.Runtime.InteropServices/ChangeLog

@@ -1,36 +1,50 @@
+2002-01-24  Miguel de Icaza  <[email protected]>
+
+	* StructLayoutAttribute.cs: Flag attribute as targetting structs
+	or classes. 
+	
+	* InAttribute.cs: Flag attribute as targettting a paramter
+
+	* OutAttribute.cs: ditto.
+	
+	* DllImportAttribute.cs: Flag attribute as targetting methods.
+	
+	* MarshalAsAttribute.cs: Flag attribute as targetting fields,
+	parameters and returnvalues.
+
 2002-01-23  Dick Porter  <[email protected]>
 
 	* Marshal.cs: Added GetLastWin32Error()
 
 	* ExternalException.cs: Implemented
 
-2002-01-17  Miguel de Icaza  <[email protected]>
-
-	* ExternalException.cs: Add ExternalException.
-
-2002-01-05  Ravi Pratap  <[email protected]>
-
-	* OutAttribute.cs : Decorate with MonoTODO.
-	
-Thu Dec 20 15:46:31 CET 2001 Paolo Molaro <[email protected]>
-
-	* FieldOffsetAttribute.cs, InAttribute.cs, MarshalAsAttribute.cs,
-	OptionalAttribute.cs, StructLayoutAttribute.cs, VarEnum.cs:
-	more stuff needed by the compiler.
-
-Thu Dec 13 20:22:18 CET 2001 Paolo Molaro <[email protected]>
-
-	* DllImportAttribute.cs: added.
-	* MethodImplOptions.cs: removed: this is already in CompilerServices.
-
-Wed Nov 14 17:02:57 CET 2001 Paolo Molaro <[email protected]>
-
-	* CallingConvention.cs: add missing Winapi.
-
-2001-07-20  Miguel de Icaza  <[email protected]>
-
-	* OutAttribute.cs: New file.
-
-2001-07-18  Michael Lambert <[email protected]>
-
-	* CallingConvention.cs.cs, CharSet.cs, GCHandleType.cs, LayoutKind.cs: Add.
+2002-01-17  Miguel de Icaza  <[email protected]>
+
+	* ExternalException.cs: Add ExternalException.
+
+2002-01-05  Ravi Pratap  <[email protected]>
+
+	* OutAttribute.cs : Decorate with MonoTODO.
+	
+Thu Dec 20 15:46:31 CET 2001 Paolo Molaro <[email protected]>
+
+	* FieldOffsetAttribute.cs, InAttribute.cs, MarshalAsAttribute.cs,
+	OptionalAttribute.cs, StructLayoutAttribute.cs, VarEnum.cs:
+	more stuff needed by the compiler.
+
+Thu Dec 13 20:22:18 CET 2001 Paolo Molaro <[email protected]>
+
+	* DllImportAttribute.cs: added.
+	* MethodImplOptions.cs: removed: this is already in CompilerServices.
+
+Wed Nov 14 17:02:57 CET 2001 Paolo Molaro <[email protected]>
+
+	* CallingConvention.cs: add missing Winapi.
+
+2001-07-20  Miguel de Icaza  <[email protected]>
+
+	* OutAttribute.cs: New file.
+
+2001-07-18  Michael Lambert <[email protected]>
+
+	* CallingConvention.cs.cs, CharSet.cs, GCHandleType.cs, LayoutKind.cs: Add.

+ 2 - 0
mcs/class/corlib/System.Runtime.InteropServices/DllImportAttribute.cs

@@ -11,6 +11,8 @@ using System;
 
 
 namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Method)]
 	public sealed class DllImportAttribute: Attribute {
 		public CallingConvention CallingConvention;
 		public CharSet CharSet;

+ 2 - 0
mcs/class/corlib/System.Runtime.InteropServices/FieldOffsetAttribute.cs

@@ -1,6 +1,8 @@
 using System;
 
 namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Field)]
 	public sealed class FieldOffsetAttribute : Attribute {
 		private int val;
 		

+ 10 - 0
mcs/class/corlib/System.Runtime.InteropServices/InAttribute.cs

@@ -1,6 +1,16 @@
+//
+// System.Runtime.InteropServices.InAttribute.cs
+//
+// Author:
+//   Paolo Molaro ([email protected])
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
 using System;
 
 namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Parameter)]
 	public sealed class InAttribute : Attribute {
 		public InAttribute () {
 		}

+ 2 - 0
mcs/class/corlib/System.Runtime.InteropServices/MarshalAsAttribute.cs

@@ -1,6 +1,8 @@
 using System;
 
 namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
 	public sealed class MarshalAsAttribute : Attribute {
 		private UnmanagedType utype;
 		public UnmanagedType ArraySubType;

+ 2 - 0
mcs/class/corlib/System.Runtime.InteropServices/OptionalAttribute.cs

@@ -1,6 +1,8 @@
 using System;
 
 namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Parameter)]
 	public sealed class OptionalAttribute : Attribute {
 		public OptionalAttribute () {
 		}

+ 1 - 1
mcs/class/corlib/System.Runtime.InteropServices/OutAttribute.cs

@@ -9,7 +9,7 @@
 
 namespace System.Runtime.InteropServices {
 
-	[MonoTODO]
+	[AttributeUsage (AttributeTargets.Parameter)]
 	public sealed class OutAttribute : Attribute {
 
 		public OutAttribute ()

+ 2 - 0
mcs/class/corlib/System.Runtime.InteropServices/StructLayoutAttribute.cs

@@ -1,6 +1,8 @@
 using System;
 
 namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct)]
 	public sealed class StructLayoutAttribute : Attribute {
 		public CharSet CharSet = CharSet.Auto;
 		public int Pack = 8;