Bug 296672: fixes to build on latest Mono, and produce non-empty interfaces.

Patch from Mark Steele <mwsteele@gmail.com>, r=shaver.
This commit is contained in:
shaver%mozilla.org 2005-06-05 15:10:12 +00:00
Родитель bcda601644
Коммит 27ba19fa07
3 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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);

Просмотреть файл

@ -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);