Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-24 Thread Jeff Hardy
2009/3/23 Curt Hagenlocher c...@hagenlocher.org: 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

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-23 Thread Dino Viehland
] 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 unfortuantely it's a little more complex than just one method. I

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-23 Thread Curt Hagenlocher
. -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] Creating Dynamic Assemblies from IronPython 2.6 Hi Dino

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-23 Thread Dino Viehland
Of 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 method

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-23 Thread Jeff Hardy
- 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] Creating Dynamic Assemblies from IronPython 2.6 Hi Dino, I'm updating

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-23 Thread Curt Hagenlocher
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 unfortuantely it's a little more complex than just one

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-21 Thread Curt Hagenlocher
, 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 to be able to convert it to something I can call. Seo's old code used

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

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 =

Re: [IronPython] Creating Dynamic Assemblies from IronPython 2.6

2009-03-20 Thread Dino Viehland
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: import clr