Assuming IP is going for the .NET producer route, what's the tact for exposing CLR classes with CLR methods? EG, would there be a 'fixed' (as in 'non-dynamic') form of method and field which won't mangle the name, allowing it to be exposed?
----- Keith J. Farmer // [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Maly Sent: Thursday, 08 December 2005 10:56 To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Name mangling for classes is not complicated. What makes it harder is not the naming, it is the way the classes are compiled. Class gets generated as a static function named: <class name>$maker<integer> that creates the class (the type) at runtime. Other than source code and exploration of generated binaries using ildasm or reflector, we don't currently have documentation on this, unfortunately. Martin -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William Reade Sent: Thursday, December 08, 2005 10:38 AM To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Sadly, NUnit won't run static methods, so that won't work, but thank you anyway. Are class names similarly mangled? If there's any documentation on this, I'd really appreciate a pointer to it, as I haven't been able to find much help elsewhere... or is it just a matter of hunting through the source? William Martin Maly wrote: >IronPython mangles names. For example: > >def method(): > return 1 > >Produces: > >public static object method$f0() > >The test_prefix would get therefore preserved so on a second thought, this may work, provided that nunit executes public static methods and doesn't require specific return value. Ours is always "object" in this case. > >Martin > > >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of William Reade >Sent: Thursday, December 08, 2005 10:02 AM >To: Discussion of IronPython >Subject: Re: [IronPython] NUnit with IronPython > >Does this mean that IronPython will emit methods, but their names will be mangled, or that it simply won't produce anything that can be effectively used from outside? > >William > >Martin Maly wrote: > > > >>This is, sadly, true. IronPython will not preserve the name of the method as we know it... >> >>Martin >> >>-----Original Message----- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf Of Keith J. >>Farmer >>Sent: Thursday, December 08, 2005 9:46 AM >>To: Discussion of IronPython >>Subject: Re: [IronPython] NUnit with IronPython >> >>For backwards compatibility, NUnit would also accept method names beginning with "test" ("test_" ?). However, I don't think IP emits methods as we know them yet? >> >>----- >>Keith J. Farmer // [EMAIL PROTECTED] >> >> >> >> > >_______________________________________________ >users mailing list >users@lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >_______________________________________________ >users mailing list >users@lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com