Permalink
Fetching contributors…
Cannot retrieve contributors at this time
561 lines (341 sloc) 18.4 KB

ctypes 0.14.0

Thanks to Andreas Hauptmann (@fdopen), Rudi Grinberg (@rgrinberg) and Marcello Seri (@mseri) for contributions to this release.

ctypes 0.13.1

ctypes 0.13.0

Thanks to Leo White (@lpw25) for contributing to this release.

ctypes 0.12.1

ctypes 0.12.0

Thanks to Bertrand Bonnefoy-Claudet (@bbc2) and Leo White (@lpw25) for contributions to this release.

ctypes 0.11.4

Thanks to Matthias Horn (@tiash) for contributing to this release.

ctypes 0.11.3

Thanks to Andreas Hauptmann (@fdopen) and Peter Zotov (@whitequark) for contributions to this release.

ctypes 0.11.2

Bug fixes

ctypes 0.11.1

Bug fixes

Thanks to Peter Zotov (@whitequark) and Jeremie Dimino (@diml) for contributions to this release.

ctypes 0.11.0

Features

Bug fixes

Thanks to Andrew Ray (@andrewray) and Yunxing Dai (@yunxing) for contributions to this release.

ctypes 0.10.2

Bug fixes

Thanks to David Sheets (@dsheets) for contributions to this release.

ctypes 0.10.1

Bug fixes

Thanks to Andreas Hauptmann (@fdopen) for contributions to this release.

ctypes 0.10.0

Features

Bug fixes

Compatibility

Thanks to Andreas Hauptmann (@fdopen) for contributions to this release.

ctypes 0.9.2

Bug fixes

ctypes 0.9.1

Bug fixes

Thanks to Enguerrand Decorne (@engil) for contributing to this release.

ctypes 0.9.0

Features

Thanks to Martin Lucina (@mato) for contributing to this release.

ctypes 0.8.0

Features

Bug fixes

Thanks to David Sheets (@dsheets) and Demi Obenour (@DemiMarie) for contributions to this release.

ctypes 0.7.0

Features

Bug fixes

Thanks to Stephane Glondu (@glondu) for contributions to this release.

ctypes 0.6.2

Bug fixes

Thanks to Andreas Hauptmann (@fdopen) for contributing to this release.

ctypes 0.6.1

Bug fixes

ctypes 0.6.0

Features

  • The Cstubs.FOREIGN interface has been extended with returning and @->, and some new types.
    See the pull request for details:
    https://github.com/ocamllabs/ocaml-ctypes/pull/389

    NB: code that generates bindings using Cstubs may need to be updated to select return and @-> from the bindings functor argument rather than from the Ctypes module. Code that needs to be updated will fail to compile with the new interface. The pull request shows how to update your code, if necessary.

  • The Cstubs module can now generate asynchronous bindings to C functions using the Lwt jobs framework.
    See the pull request for details:
    https://github.com/ocamllabs/ocaml-ctypes/pull/391

  • The Cstubs module now supports optionally returning errno alongside the return value of bound C functions.
    See the pull request for details:
    https://github.com/ocamllabs/ocaml-ctypes/pull/392

  • Cross-compilation support is improved: the configuration step no longer runs binaries on the host.
    See the pull request for details:
    https://github.com/ocamllabs/ocaml-ctypes/pull/383

  • The Unsigned.S interface has new of_int64 and to_int64 functions.

Compatibility

  • The deprecated *:* and +:+ functions have been removed. Use Ctypes.field instead.

  • OCaml 4.00.* is no longer supported. The earliest supported OCaml release is 4.01.0

Thanks to Spiros Eliopoulos (@seliopou), @orbitz, Leonid Rozenberg (@rleonid) and Peter Zotov (@whitequark) for contributions to this release.

ctypes 0.5.1

Bug fixes

  • Use a C function, not Pervasives.ignore, to keep values alive.

ctypes 0.5.0

Thanks to Andreas Hauptmann (@fdopen), David Sheets (@dsheets), Etienne Millon (@emillon), Goswin von Brederlow (@mrvn), Leonid Rozenberg (@rleonid), @orbitz, Max Mouratov (@cakeplus), and Peter Zotov (@whitequark) for contributions to this release.

Features

  • Build and install *.cmt and *.cmti files.

  • Expose time_t as an unsigned value

  • Expose larger interfaces for POSIX types known to be integer types.

  • Add support for 1- and 2-byte unsigned integer typedefs.

  • Add support for 1-byte and 2-byte integer typedefs.

  • Add a Signed.Int module.

  • Expose more information in the Uncoercible exception.

  • allocate_n now defaults to zeroing its memory.

  • Add public root management interface.

    NB: the interface is experimental and subject to change.

  • Look through views to add fields to structs and unions.

  • Support signed arithmetic operations for ssize_t.

  • Add support for ptrdiff_t as a typedef for a signed integer type.

  • Support intptr_t and uintptr_t as typedefs

  • Support coercions between object and function pointers.

  • Add public funptr_of_raw_address function.

  • Support static_funptr coercions

  • Add function pointers to the core type language

    (See the Ctypes_static.static_funptr type, on which Foreign.funptr and Foreign.foreign are now based.)

  • Better support for functions returning void with inverted stubs.

  • Add support for releasing runtime lock to Cstubs_inverted.

Bug fixes

  • Fix: inconsistent use of caml_stat_* functions

  • Fix: a memory leak in ctypes_caml_roots_release

ctypes 0.4.2

  • Fix a bug involving access to local roots while the runtime lock was not held.

ctypes 0.4.1

Thanks to Etienne Millon (@emillon) for contributing to this release.

  • Fix placement of docstring titles
  • Add funptr's optional arguments to funptr_opt
  • Fix a typo in libffi detection code
  • Synchronize foreign.mli files (documentation)

ctypes 0.4

Thanks to A. Hauptmann (@fdopen), David Sheets (@dsheets), Maverick Woo (@maverickwoo), Peter Zotov (@whitequark), David Kaloper (@pqwy), Ramkumar Ramachandra (@artagnon), Thomas Braibant (@braibant), Hugo Heuzard (@hhugo) and Edwin Török (@edwintorok) for contributions to this release.

Major features

  • Support for the C99 bool type

  • Typedef support

  • Enum support

  • Support for accessing C globals with foreign_value in generated stubs

  • Support for retrieving #define and enum constants from C

  • Windows support

    There is now support for Windows (32-bit and 64-bit, using MinGW) and automatic building and testing on Windows using Appveyor.

  • Support for releasing the runtime lock in C calls

    The new release_runtime_lock argument to Foreign.foreign indicates whether the OCaml runtime lock should be released during the call to the bound C function, allowing other threads to run.

  • Support for acquiring the runtime lock in callbacks

    There is a new runtime_lock argument to Foreign.funptr. Setting runtime_lock to true indicates that the OCaml runtime lock should be acquired during calls from C to OCaml and released during calls through function pointers from OCaml to C.

  • Support for passing 'bytes' values directly to C

    See the relevant section of the FAQ.

  • Add support for custom printers in views.

  • Optionally obtain struct and union layout from C

Other changes

  • string_opt wraps char *, not void *.
  • Remove some poorly-supported POSIX types
  • Use nativeint to represent pointers
  • Support zero-argument callbacks
  • findlib package naming: ctypes.foreign-base ~> ctypes.foreign.base &c.
  • Make it possible to print a field name
  • Better exception handling when using RTLD_NOLOAD
  • RTLD_LOCAL support
  • Changed the #include path to $(ocamlfind query ctypes)
  • Renamed some internal modules to avoid name clashes

ctypes 0.3.4

Bug fixes

Thanks to Yakov Zaytsev (@ysz) for contributing to this release.

  • fix printing for nullary function stubs

ctypes 0.3.3

Bug fixes

  • respect pbyte_offset with cstubs

ctypes 0.3.2

  • Add bytes to the META "requires" field

ctypes 0.3.1

New features

  • Support for 'bytes'

Bug fixes

  • Avoid invalidated pointer access

ctypes 0.3

Thanks to Peter Zotov (@whitequark), David Sheets (@dsheets), Mike McClurg (@mcclurmc) and Anil Madhavapeddy (@avsm) for contributions to this release.

Major features

Support for passing OCaml strings directly to C

(Patch by Peter Zotov.)

The implications are discussed in the FAQ.

Support for generating C stubs from names and type declarations.

There are various examples available of packages which use stub support: see the fts example in the distribution (which uses a custom Makefile), this fork of async_ssl (which uses OCamlMakefile), and the cstubs branch of ocaml-lz4 (which uses oasis and ocamlbuild).

Support for turning OCaml modules into C libraries.

See the ocaml-ctypes-inverted-stubs-example repository for a sample project which exposes a part of Xmlm's API to C.

Other changes

Backwards incompatibilities

  • Array has been renamed to CArray.

ctypes 0.2.3

Bug fixes

  • Fix GC-related bug that shows up on OS X.

ctypes 0.2.2

  • Don't install ctypes-foreign cmx files.

ctypes 0.2.1

  • Bump META version

ctypes 0.2

Thanks to Ivan Gotovchits, Greg Perkins, Daniel Bünzli, Rob Hoes and Anil Madhavapeddy for contributions to this release.

Major features

Bigarray support.

See Bigarray types and Bigarray values for details.

Give the user control over the lifetime of closures passed to C.

See the FAQ for details.

Top level printing for C values and types

Loading the new findlib package ctypes.top in the toplevel will install custom printers for C types and values.

Other changes

ctypes 0.1.1

Bug fixes

  • Remove hard-coded alloc size

ctypes 0.1

initial release