ctypes 0.6.3 released

T

Thomas Heller

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
 
G

Ganesan R

Thomas" == Thomas Heller said:
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
 
T

Thomas Heller

Ganesan R said:
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' ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ANN: ctypes 1.0.2 released 0
[Ann] ctypes 0.9.5 released 0
ctypes 0.9.2 released 19
ctypes 0.9.1 released 1
[Ann] ctypes wiki 0
py2exe 0.6.3 released 0
pypy and ctypes 2
ctypes for IronPython (preliminary) 0

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top