Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-24 Thread Jeff Hardy
2009/3/23 Curt Hagenlocher : > It's not quite that straightforward with p/Invoke though -- it can be *very* > convenient to define multiple overloads for the same C function with > different signatures. Consider the GetPrinter function and the different > versions of the PRINTER_INFO_x structure it

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-23 Thread Curt Hagenlocher
lt-in > function. > >> > >> > -Original Message- > >> > From: users-boun...@lists.ironpython.com [mailto:users- > >> > boun...@lists.ironpython.com] On Behalf Of Jeff Hardy > >> > Sent: Saturday, March 21, 2009 1:17 PM > >> &g

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-23 Thread Jeff Hardy
o modify any built-in function. >> >> > -Original Message- >> > From: users-boun...@lists.ironpython.com [mailto:users- >> > boun...@lists.ironpython.com] On Behalf Of Jeff Hardy >> > Sent: Saturday, March 21, 2009 1:17 PM >> > To: Discussio

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-23 Thread Dino Viehland
Curt Hagenlocher Sent: Monday, March 23, 2009 3:43 PM To: Discussion of IronPython Subject: Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6 I seem to recall that in Seo's original code, MakeOrAdd was used to build up the overloads over time as user code asked for additional m

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-23 Thread Curt Hagenlocher
n. > > > -Original Message- > > From: users-boun...@lists.ironpython.com [mailto:users- > > boun...@lists.ironpython.com] On Behalf Of Jeff Hardy > > Sent: Saturday, March 21, 2009 1:17 PM > > To: Discussion of IronPython > > Subject: Re: [IronPython] C

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-23 Thread Dino Viehland
ironpython.com] On Behalf Of Jeff Hardy > Sent: Saturday, March 21, 2009 1:17 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Creating Dynamic Assemblies from IronPython > 2.6 > > Hi Dino, > I'm updating Seo's old ctypes.py to work with 2.6, so unfortu

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-21 Thread Jeff Hardy
Hi Dino, I'm updating Seo's old ctypes.py to work with 2.6, so unfortuantely it's a little more complex than just one method. I could probably use a delegate that takes an object[], but BuiltinFunction contains that code already, and it is a lot more optimized than I could manage. Plus it's less co

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-21 Thread Curt Hagenlocher
Of Jeff Hardy > > Sent: Saturday, March 21, 2009 9:44 AM > > To: Discussion of IronPython > > Subject: Re: [IronPython] Creating Dynamic Assemblies from IronPython > > 2.6 > > > > Thanks Curt, that worked. Now I have a new problem - I can get a > > Meth

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-21 Thread Dino Viehland
.ironpython.com] On Behalf Of Jeff Hardy > Sent: Saturday, March 21, 2009 9:44 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Creating Dynamic Assemblies from IronPython > 2.6 > > Thanks Curt, that worked. Now I have a new problem - I can get a > MethodInfo, but I need

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-21 Thread Jeff Hardy
Thanks Curt, that worked. Now I have a new problem - I can get a MethodInfo, but I need to be able to convert it to something I can call. Seo's old code used BuiltinFunction.MakeOrAdd, but that is now internal. Can this be made public, or is there a better way to handle it? - Jeff 2009/3/20 Curt

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-20 Thread Dino Viehland
day, March 20, 2009 5:29 PM To: Discussion of IronPython Subject: Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6 I think this is something that broke well before the 2.0 release. To work around it in pyc.py, we added DefineDynamicAssembly to the PythonOps class in IronPython:

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-20 Thread Curt Hagenlocher
I think this is something that broke well before the 2.0 release. To work around it in pyc.py, we added DefineDynamicAssembly to the PythonOps class in IronPython: import clr clr.AddReference('IronPython') from IronPython.Runtime.Operations import PythonOps assemblyBuilder = PythonOps.DefineDynam