[Mono-list] frozen regex support?

Chris Daly cdaly@locosoft.net
Tue, 3 Sep 2002 21:48:21 -0700


> I believe Daniel is saying that the assemblies created by the API in
> question call back into the MS RegEx libraries in an undocumented
> fashion. Since those assemblies can concievably be 'compiled' using an
> MS-based runtime and then consumed by a MONO-based runtime, the mono
> runtime would need to support whatever API calls those assemblies make.

I don't know about the legal issues, but I think I understand the technical
issues
because I'm working on a tool that does something similar to
Regex.CompileToAssembly().

If you look at the assembly generated by Daniel's test case you will see it
contains
a class who's base class is System.Text.RegularExpresssions.Regex.  Thus it
can
call protected methods and use protected fields in the base class.  So if
you generated
the assembly with Microsoft's System.dll and tried to run it with Mono's
System.dll
you could have problems.  The generated assembly might be trying to access a
protected
string named _pattern, but Mono's Regex might have called it _thePattern or
might have
made it a char[] instead of string.  The possible differences are boundless.
:-(

Chris