2005-01-26 Martin Baulig <martin@ximian.com>
[mono.git] / mcs / mbas / attribute.cs
index b024bb4674401d680e241fe995e95a2e4b2675ac..9011ee653997a919a51b3cdb76d1d177bec3d6e0 100644 (file)
@@ -436,7 +436,7 @@ namespace Mono.MonoBASIC {
 
                public static bool CheckAttribute (Attribute a, object element)
                {
-                       TypeContainer attr = TypeManager.LookupClass (a.Type);
+                       //TypeContainer attr = TypeManager.LookupClass (a.Type);
                        AttributeTargets targets = a.GetAttributeUsage ().ValidOn;
 
 
@@ -528,7 +528,7 @@ namespace Mono.MonoBASIC {
                }
 
                //
-               // This method should be invoked to pull the IndexerName attribute from an
+               // This method should be invoked to pull the DefaultPropName attribute from an
                // Indexer if it exists.
                //
                public static string ScanForIndexerName (EmitContext ec, Attributes opt_attrs)
@@ -544,7 +544,7 @@ namespace Mono.MonoBASIC {
                                        continue;
 
                                //
-                               // So we have found an IndexerName, pull the data out.
+                               // So we have found an DefaultPropName, pull the data out.
                                //
                                if (a.Arguments == null || a.Arguments [0] == null){
                                        Error_AttributeConstructorMismatch (a.Location);
@@ -689,15 +689,7 @@ namespace Mono.MonoBASIC {
                                        } else if (a.Type != TypeManager.dllimport_type){
                                                        ((MethodBuilder) builder).SetCustomAttribute (cb);
                                        }
-                               } else if (kind is ParameterBuilder) {
-                                       if (a.Type == TypeManager.marshal_as_attr_type) {
-                                               UnmanagedMarshal marshal = UnmanagedMarshal.DefineUnmanagedMarshal (a.UnmanagedType);
-                                               ((ParameterBuilder) builder).SetMarshal (marshal);
-                                       } else 
-                                               ((ParameterBuilder) builder).SetCustomAttribute (cb);
-                               } else if (kind is FieldBuilder) {
-                                       ((FieldBuilder) builder).SetCustomAttribute (cb);
-                               } else
+                               }  else
                                        throw new Exception ("Unknown kind: " + kind);
                        }
                }
@@ -743,8 +735,8 @@ namespace Mono.MonoBASIC {
                        CallingConvention cc = CallingConvention.Winapi;
                        CharSet charset = CharSet.Ansi;
                        bool preserve_sig = true;
-                       bool exact_spelling = false;
-                       bool set_last_err = false;
+                       /*bool exact_spelling = false;
+                       bool set_last_err = false;*/
                        string entry_point = null;
 
                        for (int i = 0; i < named_args.Count; i++) {
@@ -786,10 +778,10 @@ namespace Mono.MonoBASIC {
                                                        charset = (CharSet) c.GetValue ();
                                                else if (member_name == "EntryPoint")
                                                        entry_point = (string) c.GetValue ();
-                                               else if (member_name == "SetLastError")
+                                               /*else if (member_name == "SetLastError")
                                                        set_last_err = (bool) c.GetValue ();
                                                else if (member_name == "ExactSpelling")
-                                                       exact_spelling = (bool) c.GetValue ();
+                                                       exact_spelling = (bool) c.GetValue ();*/
                                                else if (member_name == "PreserveSig")
                                                        preserve_sig = (bool) c.GetValue ();
                                        } else {