ctypes 0.6.3 released

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Thomas Heller

    ctypes 0.6.3 released

    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
  • Ganesan R

    #2
    Re: ctypes 0.6.3 released

    >>>>> "Thomas" == Thomas Heller <theller@python .net> writes:
    [color=blue]
    > It works on Windows, Linux and MacOS X (the latter require that
    > your machine is supported by libffi).[/color]

    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_LO NG == 8 && SIZEOF_LONG == 4)
    #undef ffi_type_ulong
    #define ffi_type_ulong ffi_type_uint32
    -#define ffi_type_ulongl ong ffi_type_uint64
    #undef ffi_type_slong
    #define ffi_type_slong ffi_type_sint32
    -#define ffi_type_slongl ong ffi_type_sint64
    #endif
    +#define ffi_type_ulongl ong ffi_type_uint64
    +#define ffi_type_slongl ong 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

    Comment

    • Thomas Heller

      #3
      Re: ctypes 0.6.3 released

      Ganesan R <rganesan@myrea lbox.com> writes:
      [color=blue][color=green][color=darkred]
      >>>>>> "Thomas" == Thomas Heller <theller@python .net> writes:[/color][/color]
      >[color=green]
      >> It works on Windows, Linux and MacOS X (the latter require that
      >> your machine is supported by libffi).[/color]
      >
      > 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_LO NG == 8 && SIZEOF_LONG == 4)
      > #undef ffi_type_ulong
      > #define ffi_type_ulong ffi_type_uint32
      > -#define ffi_type_ulongl ong ffi_type_uint64
      > #undef ffi_type_slong
      > #define ffi_type_slong ffi_type_sint32
      > -#define ffi_type_slongl ong ffi_type_sint64
      > #endif
      > +#define ffi_type_ulongl ong ffi_type_uint64
      > +#define ffi_type_slongl ong ffi_type_sint64
      >
      > Ganesan[/color]

      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' ?

      Comment

      Working...