Re: [Python.NET] Updates to callconvutil.cs for .NET 2.0

2005-09-20 Thread Brian Lloyd

Hee hee - this is good news. I'm looking forward to getting 
rid of that horrible IL hack... ;)

Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering   540.361.1716  
Zope Corporation   http://www.zope.com 


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Greg Chapman
> Sent: Monday, September 19, 2005 3:50 PM
> To: [email protected]
> Subject: Re: [Python.NET] Updates to callconvutil.cs for .NET 2.0
> 
> 
> Michael Eddington wrote:
> 
> > Anyone else out there started to mess with Python.NET on the 2.0
> > platform?  One of the first hurtles was the output from ildasm does
> > not always place the method name on the next line, causing
> > callconvutil to place the modopt in the wrong place.  I've added a
> > regex in to check for and split the method line if the function name
> > is found.
> 
> Here's something I just discovered.  You can now (in .NET 2.0) apply
> the UnmanagedFunctionPointer attribute to delegate types to get them to
> work as cdecl.  For example:
> 
> [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
> public delegate IntPtr UnaryFunc(IntPtr ob);
> 
> >From what I can tell, that delegate type is compatible with any managed
> method with the right signature.  When called from unmanaged code, such
> delegates will use the cdecl convention (this must be done in some kind
> of thunk, since the method itself still uses the normal .NET calling
> convention).
> 
> Anyway, the upshot is it looks like you can apply that attribute to all
> the CallConvCDecl delegates in Interop.cs (removing the CallConvCDecl
> attribute, since it's not needed), and then not need callconvutil at
> all.
> 
> -- 
> Greg Chapman
> 
> 
> _
> Python.NET mailing list - [email protected]
> http://mail.python.org/mailman/listinfo/pythondotnet
> 
_
Python.NET mailing list - [email protected]
http://mail.python.org/mailman/listinfo/pythondotnet


[Python.NET] PythonNet and .NET Framework 2.0

2005-09-20 Thread Aaron Stubbs








Is there any way to use PythonNet with the 2.0 version of
the .Net framework?  The assemblies we’re working with will for the
test harness we’re creating will all be .Net 2.0 assemblies, so if there’s
anything we can do to get PythonNet working with them I’d be all
ears.  I did note that this will be a specific feature (as outlined by
Brian) for the PythonNet 2.x releases, but that appears to be a little way off…

 

Thanks in advance for you time.

Aaron

 






_
Python.NET mailing list - [email protected]
http://mail.python.org/mailman/listinfo/pythondotnet