From 27ba19fa07923debadb25d3b2243c1efb0ac2919 Mon Sep 17 00:00:00 2001 From: "shaver%mozilla.org" Date: Sun, 5 Jun 2005 15:10:12 +0000 Subject: [PATCH] Bug 296672: fixes to build on latest Mono, and produce non-empty interfaces. Patch from Mark Steele , r=shaver. --- extensions/mono/src/proxy-generator.cs | 2 +- extensions/mono/src/typeinfo.cs | 6 +++--- extensions/mono/tools/generate-interfaces.cs | 8 ++++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/extensions/mono/src/proxy-generator.cs b/extensions/mono/src/proxy-generator.cs index 7a710ec8fb85..bc6de5c2895f 100644 --- a/extensions/mono/src/proxy-generator.cs +++ b/extensions/mono/src/proxy-generator.cs @@ -206,7 +206,7 @@ class ProxyGenerator EmitPrepareArgStore(i); ilg.Emit(OpCodes.Stind_I4); break; - case TypeTag.NSIDPtr: + case TypeTag.NSIdPtr: EmitPrepareArgStore(i); ilg.Emit(OpCodes.Stind_I4); // XXX 64-bitness break; diff --git a/extensions/mono/src/typeinfo.cs b/extensions/mono/src/typeinfo.cs index 2679905d27fb..95f8ee20d4f2 100644 --- a/extensions/mono/src/typeinfo.cs +++ b/extensions/mono/src/typeinfo.cs @@ -17,10 +17,10 @@ public struct XPTType public byte padding; public UInt16 arg3; - static implicit operator XPTType(TypeInfo.TypeDescriptor td) + static public implicit operator XPTType(TypeInfo.TypeDescriptor td) { XPTType t = new XPTType(); - t.prefix = (byte)(td.flags | td.tag); + t.prefix = (byte) ((byte)td.flags | (byte)td.tag); t.arg1 = td.arg1; t.arg2 = td.arg2; t.arg3 = td.arg3; @@ -91,7 +91,7 @@ public class TypeInfo return false; } - static implicit operator TypeDescriptor(XPTType t) + static public implicit operator TypeDescriptor(XPTType t) { TypeDescriptor td = new TypeInfo.TypeDescriptor(); td.flags = (TypeFlags)(t.prefix & XPTType.FlagMask); diff --git a/extensions/mono/tools/generate-interfaces.cs b/extensions/mono/tools/generate-interfaces.cs index 08e17babe32d..9ed229ffd3b6 100644 --- a/extensions/mono/tools/generate-interfaces.cs +++ b/extensions/mono/tools/generate-interfaces.cs @@ -12,7 +12,8 @@ public class Generate PropertyBuilder lastProperty = null; const PropertyAttributes PROPERTY_ATTRS = PropertyAttributes.None; const MethodAttributes METHOD_ATTRS = MethodAttributes.Public | - MethodAttributes.Abstract | MethodAttributes.Virtual; + MethodAttributes.Abstract | MethodAttributes.Virtual | + MethodAttributes.NewSlot; Type FixupInterfaceType(TypeInfo.ParamDescriptor desc) { @@ -87,9 +88,12 @@ public class Generate else parentType = EmitOneInterface(parentName); + Console.WriteLine ("Emitting: " + name + " : " + parentType); + TypeBuilder ifaceTb = mb.DefineType("Mozilla.XPCOM.Interfaces." + name, TypeAttributes.Public | - TypeAttributes.Interface, + TypeAttributes.Interface | + TypeAttributes.Abstract, parentType); ifaceTable.Add(name, ifaceTb);