Update to the latest IKVM.Reflection
[mono.git] / mcs / class / IKVM.Reflection / CustomAttributeData.cs
index 72026fb9b4d633fe80077fc4787ee26f0c6e1e26..6c4c2a7b64100494ec41a79da90a9391e03c8e82 100644 (file)
@@ -243,13 +243,13 @@ namespace IKVM.Reflection
                        if (br.PeekByte() == '.')
                        {
                                br.ReadByte();
-                               int count = br.ReadCompressedInt();
+                               int count = br.ReadCompressedUInt();
                                for (int j = 0; j < count; j++)
                                {
                                        Type type = ReadType(asm, br);
                                        ConstructorInfo constructor = type.GetPseudoCustomAttributeConstructor(u.System_Security_Permissions_SecurityAction);
                                        // LAMESPEC there is an additional length here (probably of the named argument list)
-                                       byte[] blob = br.ReadBytes(br.ReadCompressedInt());
+                                       byte[] blob = br.ReadBytes(br.ReadCompressedUInt());
                                        list.Add(new CustomAttributeData(asm, constructor, action, blob, index));
                                }
                        }
@@ -601,7 +601,7 @@ namespace IKVM.Reflection
                                                // 5) Unresolved declarative security
                                                ByteReader br = new ByteReader(declSecurityBlob, 0, declSecurityBlob.Length);
                                                // LAMESPEC the count of named arguments is a compressed integer (instead of UInt16 as NumNamed in custom attributes)
-                                               lazyNamedArguments = ReadNamedArguments(module.Assembly, br, br.ReadCompressedInt(), Constructor.DeclaringType);
+                                               lazyNamedArguments = ReadNamedArguments(module.Assembly, br, br.ReadCompressedUInt(), Constructor.DeclaringType);
                                        }
                                }
                                return lazyNamedArguments;
@@ -736,7 +736,7 @@ namespace IKVM.Reflection
                        }
                        ModuleBuilder mb = module as ModuleBuilder;
                        int token = parameter.MetadataToken;
-                       if (mb != null && mb.IsSaved && mb.IsPseudoToken(token))
+                       if (mb != null && mb.IsSaved && ModuleBuilder.IsPseudoToken(token))
                        {
                                token = mb.ResolvePseudoToken(token);
                        }