[Mono-list] Re: PInvoke:TNG

Rhys Weatherley rweather@zip.com.au
Fri, 27 Jul 2001 17:47:19 +1000

Robert Deviasse wrote:

> So here's my proposal for dealing with this. Suppose we define an attribute
> called, "SystemDependent" that takes one parameter, the name of a namespace.
> Your example would look like the following:

If I'm understanding this correctly, your proposal is to say
"don't use this type here, use the other one over there",
where "the other one over there" is in a system-specific
namespace and/or assembly.  The VM would substitute
the type behind the scenes when the assembly is loaded.

This way, there would be one main "corlib.dll" that had
the primary definitions in it, and then each system would
have its own "native.dll" that re-defined the types to
what the local system required.

This "native.dll" could be generated automatically using
some autoconf magic when the VM is built for a given
system, and would probably be quite small.  Also, the
VM itself doesn't need to know about "int_t", "off_t",
"stat_t", etc, because all the knowledge is encoded into
"native.dll", which is much easier to update.

Am I understanding this correctly?