This is an automated email from the git hooks/post-receive script.

glondu pushed a commit to branch master
in repository ocaml-ctypes.

commit d6c6f6869aa1300e87a80f345a9489835c20a4f5
Author: Stephane Glondu <st...@glondu.net>
Date:   Tue Jun 14 11:23:52 2016 +0200

    Imported Upstream version 0.6.1
---
 .travis-ci.sh                 | 45 ++++++++++++++++---------------------------
 CHANGES.md                    |  7 +++++++
 META                          | 14 +++++++-------
 Makefile.examples             |  6 ++++++
 ctypes.opam                   | 16 ++++++++++++++-
 src/cstubs/cstubs_inverted.ml |  3 +++
 6 files changed, 55 insertions(+), 36 deletions(-)

diff --git a/.travis-ci.sh b/.travis-ci.sh
index 21e6e0c..ab25dc7 100644
--- a/.travis-ci.sh
+++ b/.travis-ci.sh
@@ -1,14 +1,3 @@
-if test $COVERAGE -a $TRAVIS_OS_NAME != osx ; then
-    USE_BISECT=true;
-fi
-
-OPAM_DEPENDS="ocamlfind ounit lwt"
-if test $USE_BISECT ; then
-    OPAM_DEPENDS="$OPAM_DEPENDS bisect_ppx ocveralls"
-    MAKE="make COVERAGE=true"
-else
-    MAKE="make"
-fi
 case "$OCAML_VERSION" in
 4.01.0) ppa=avsm/ocaml41+opam12 ;;
 4.02.3) ppa=avsm/ocaml42+opam12 ;;
@@ -56,26 +45,26 @@ ocaml -version
 echo OPAM versions
 opam --version
 opam --git-version
-opam install ${OPAM_DEPENDS}
+
+
 eval `opam config env`
-$MAKE
-# build and run the tests
-$MAKE test
-# build and run the examples
-$MAKE examples
-_build/date.native
-_build/date-cmd.native
-_build/fts-cmd.native examples
 
-if test $USE_BISECT ; then
-    ocveralls --send bisect*.out _build/bisect*.out > coveralls.json
+# Optional dependencies for coverage testing
+if test $COVERAGE -a $TRAVIS_OS_NAME != osx ; then
+    opam install bisect_ppx ocveralls
 fi
 
-# check Xen support builds too
-set -eu
-if opam install mirage-xen; then
-  make XEN=enable
-  ls -l _build/libctypes_stubs_xen.a
+# Optional dependencies for Xen build
+opam install mirage-xen || echo "Mirage not installable, so not testing Xen 
build."
+
+opam pin add -n ctypes $(pwd)
+opam install --build-test --yes ctypes
+
+# Check that the inverted stubs package builds with this release
+opam pin add -n ctypes-inverted-stubs-example 
https://github.com/yallop/ocaml-ctypes-inverted-stubs-example.git 
+if test ! $COVERAGE && opam install --show-actions 
ctypes-inverted-stubs-example; then
+    opam install --build-test --yes ctypes-inverted-stubs-example
 else
-  echo "Mirage not installable, so not testing Xen build."
+    echo "Pinning the inverted stubs example failed, probably due to OCaml 
version incompatibility"
 fi
+
diff --git a/CHANGES.md b/CHANGES.md
index e3daeea..72d6f3c 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,3 +1,10 @@
+## ctypes 0.6.1
+
+### Bug fixes
+
+* Fix constructor qualification in code generated for inverted stubs:
+    https://github.com/ocamllabs/ocaml-ctypes/pull/397
+
 ## ctypes 0.6.0
 
 ### Features
diff --git a/META b/META
index 1f16935..e2dcf0f 100644
--- a/META
+++ b/META
@@ -1,4 +1,4 @@
-version = "0.6.0"
+version = "0.6.1"
 description = "Combinators for binding to C libraries without writing any C."
 requires = "unix bigarray str bytes"
 archive(byte) = "ctypes.cma"
@@ -8,7 +8,7 @@ archive(native, plugin) = "ctypes.cmxs"
 exists_if = "ctypes.cma"
 
 package "top" (
-  version = "0.6.0"
+  version = "0.6.1"
   description = "Toplevel printers for C types"
   requires = "ctypes"
   archive(byte) = "ctypes-top.cma"
@@ -19,7 +19,7 @@ package "top" (
 )
 
 package "stubs" (
-  version = "0.6.0"
+  version = "0.6.1"
   description = "Stub generation from C types"
   requires = "ctypes"
   archive(byte) = "cstubs.cma"
@@ -31,13 +31,13 @@ package "stubs" (
 )
 
 package "foreign" (
- version = "0.6.0"
+ version = "0.6.1"
  description = "Dynamic linking of C functions"
  requires(-mt) = "ctypes.foreign.unthreaded"
  requires(mt) = "ctypes.foreign.threaded"
 
  package "base" (
-  version = "0.6.0"
+  version = "0.6.1"
   description = "Dynamic linking of C functions (base package)"
   requires = "ctypes"
   archive(byte) = "ctypes-foreign-base.cma"
@@ -48,7 +48,7 @@ package "foreign" (
  )
 
  package "threaded" (
-  version = "0.6.0"
+  version = "0.6.1"
   description = "Dynamic linking of C functions (for use in threaded programs)"
   requires = "threads ctypes ctypes.foreign.base"
   archive(byte) = "ctypes-foreign-threaded.cma"
@@ -59,7 +59,7 @@ package "foreign" (
  )
 
  package "unthreaded" (
-  version = "0.6.0"
+  version = "0.6.1"
   description = "Dynamic linking of C functions (for use in unthreaded 
programs)"
   requires = "ctypes ctypes.foreign.base"
   archive(byte) = "ctypes-foreign-unthreaded.cma"
diff --git a/Makefile.examples b/Makefile.examples
index 84495e5..024df34 100644
--- a/Makefile.examples
+++ b/Makefile.examples
@@ -107,6 +107,12 @@ EXAMPLES += ncurses ncurses-stubs                     
ncurses-cmd-build ncurses-
 EXAMPLES += fts     fts-stubs     fts-stub-generator  fts-cmd-build     fts-cmd
 EXAMPLES += date    date-stubs    date-stub-generator date-cmd-build    
date-cmd
 
+run-examples: examples
+        # this doesn't run the ncurses example, which takes control of the 
terminal 
+       _build/date.native
+       _build/date-cmd.native
+       _build/fts-cmd.native src
+
 .PHONY: build $(EXAMPLES)
 
 examples: build $(EXAMPLES)
diff --git a/ctypes.opam b/ctypes.opam
index d903191..1707d67 100644
--- a/ctypes.opam
+++ b/ctypes.opam
@@ -7,7 +7,12 @@ dev-repo: "http://github.com/ocamllabs/ocaml-ctypes.git";
 bug-reports: "http://github.com/ocamllabs/ocaml-ctypes/issues";
 license: "MIT"
 build: [
-  [make "XEN=%{mirage-xen:enable}%" "libffi.config" "ctypes-base" 
"ctypes-stubs"]
+  [make
+    "XEN=%{mirage-xen:enable}%"
+    "COVERAGE=true" {bisect_ppx:installed}
+    "libffi.config"
+    "ctypes-base"
+    "ctypes-stubs"]
   [make "XEN=%{mirage-xen:enable}%" "ctypes-foreign"] 
{ctypes-foreign:installed}
 ]
 install: [
@@ -21,10 +26,19 @@ depends: [
    "ocamlfind" {build}
    "conf-pkg-config" {build}
    "lwt" {test}
+   "ctypes-foreign" {test}
+   "ounit" {test}
 ]
 depopts: [
    "ctypes-foreign"
    "mirage-xen"
+   "bisect_ppx" {test}
+   "ocveralls" {test}
+]
+build-test: [
+   [make "COVERAGE=true" {bisect_ppx:installed} "test"]
+   [make "COVERAGE=true" {bisect_ppx:installed} "run-examples"]
+   ["sh" "-c" "ocveralls" "--send bisect*.out" "_build/bisect*.out" ">" 
"coveralls.json"] {bisect_ppx:installed}
 ]
 tags: ["org:ocamllabs" "org:mirage"]
 available: [ ocaml-version >= "4.01.0" ]
diff --git a/src/cstubs/cstubs_inverted.ml b/src/cstubs/cstubs_inverted.ml
index 961b7e0..e945ce6 100644
--- a/src/cstubs/cstubs_inverted.ml
+++ b/src/cstubs/cstubs_inverted.ml
@@ -130,6 +130,9 @@ let gen_ml fmt register (infos : fn_info list) : unit =
     "type 'a fn = 'a@\n@\n";
   Format.fprintf fmt
     "module CI = Cstubs_internals@\n@\n";
+  Format.fprintf fmt "type 'a f = 'a CI.fn =@\n";
+  Format.fprintf fmt " | Returns  : 'a CI.typ   -> 'a f@\n";
+  Format.fprintf fmt " | Function : 'a CI.typ * 'b f  -> ('a -> 'b) f@\n";
   Format.fprintf fmt
     "type 'a name = @\n";
   ListLabels.iter infos

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-ocaml-maint/packages/ocaml-ctypes.git

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to