Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > ctypes 0.6.3 released

Reply
Thread Tools

ctypes 0.6.3 released

 
 
Thomas Heller
Guest
Posts: n/a
 
      01-16-2004
It's release day

ctypes 0.6.3 released
=====================

Overview

'ctypes' is a Python package to create and manipulate C data types
in Python, and to call functions in dynamic link libraries/shared
dlls. It allows wrapping these libraries in pure Python.

It works on Windows, Linux and MacOS X (the latter require that
your machine is supported by libffi).


Changes

A critical bug with pointer instances was fixed, this makes the
'incomplete types' sample code in the tutorial actually work.

All ctypes objects are now correctly garbarge collected. This
*may* lead to crashes in your program (especially with callback
functions, or pointers handed out to longer running C code). You
must keep a reference in Python to any object as long as it is
used in foreign C code.

All other known bugs have been fixed.

Again, a lot of changes to the COM package, but all this is still work in
progress and unstable, and it has to be properly documented.

Homepage

<http://starship.python.net/crew/theller/ctypes/>

Enjoy,

Thomas
 
Reply With Quote
 
 
 
 
Ganesan R
Guest
Posts: n/a
 
      01-20-2004
>>>>> "Thomas" == Thomas Heller <(E-Mail Removed)> writes:

> It works on Windows, Linux and MacOS X (the latter require that
> your machine is supported by libffi).


Hi,

I maintain the ctypes Debian package. The following patch allows ctypes to
be built on 64-bit archs.

--- ctypes-0.6.3.orig/source/callproc.c
+++ ctypes-0.6.3/source/callproc.c
@@ -549,11 +549,11 @@
#if (SIZEOF_LONG_LONG == 8 && SIZEOF_LONG == 4)
#undef ffi_type_ulong
#define ffi_type_ulong ffi_type_uint32
-#define ffi_type_ulonglong ffi_type_uint64
#undef ffi_type_slong
#define ffi_type_slong ffi_type_sint32
-#define ffi_type_slonglong ffi_type_sint64
#endif
+#define ffi_type_ulonglong ffi_type_uint64
+#define ffi_type_slonglong ffi_type_sint64

Ganesan

--
Ganesan R (rganesan at debian dot org) | http://www.debian.org/~rganesan/
1024D/5D8C12EA, fingerprint F361 84F1 8D82 32E7 1832 6798 15E0 02BA 5D8C 12EA

 
Reply With Quote
 
 
 
 
Thomas Heller
Guest
Posts: n/a
 
      01-20-2004
Ganesan R <(E-Mail Removed)> writes:

>>>>>> "Thomas" == Thomas Heller <(E-Mail Removed)> writes:

>
>> It works on Windows, Linux and MacOS X (the latter require that
>> your machine is supported by libffi).

>
> Hi,
>
> I maintain the ctypes Debian package. The following patch allows ctypes to
> be built on 64-bit archs.
>
> --- ctypes-0.6.3.orig/source/callproc.c
> +++ ctypes-0.6.3/source/callproc.c
> @@ -549,11 +549,11 @@
> #if (SIZEOF_LONG_LONG == 8 && SIZEOF_LONG == 4)
> #undef ffi_type_ulong
> #define ffi_type_ulong ffi_type_uint32
> -#define ffi_type_ulonglong ffi_type_uint64
> #undef ffi_type_slong
> #define ffi_type_slong ffi_type_sint32
> -#define ffi_type_slonglong ffi_type_sint64
> #endif
> +#define ffi_type_ulonglong ffi_type_uint64
> +#define ffi_type_slonglong ffi_type_sint64
>
> Ganesan


Cool, thanks. I've applied this in cvs.

Thomas

PS: Can you post (or send by private email, if it is large, the output
of the test suite: 'python setup.py test' ?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WindowsXP/ CTypes - How to convert ctypes array to a string? dudeja.rajat@gmail.com Python 0 08-19-2008 10:20 AM
[Ann] ctypes 0.9.5 released Thomas Heller Python 0 03-12-2005 12:06 PM
ctypes 0.9.2 released Thomas Heller Python 19 11-27-2004 06:01 PM
ctypes 0.9.1 released Thomas Heller Python 1 09-16-2004 11:19 PM
RE: [ctypes-users] [Ann] ctypes 0.9.0 released Henk Punt Python 0 07-23-2004 10:34 PM



Advertisments