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

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

commit 3154feee54476f6cd58764159a82c9d25e98142f
Author: Stephane Glondu <st...@glondu.net>
Date:   Thu Dec 3 17:20:35 2015 +0100

    Imported Upstream version 0.4.1
---
 CHANGES.md                                      |  9 +++++++++
 META                                            | 14 +++++++-------
 Makefile                                        | 13 ++++++++++++-
 appveyor.yml                                    |  7 +++----
 appveyor/build.sh                               |  5 ++++-
 appveyor/install.sh                             | 25 +++++++++++++++++++++++++
 src/cstubs/cstubs.mli                           |  2 +-
 src/ctypes-foreign-base/ctypes_foreign_basis.ml |  5 +++--
 src/ctypes-foreign-threaded/foreign.mli         |  3 +++
 src/ctypes-foreign-unthreaded/foreign.mli       |  8 +++++++-
 src/ctypes/ctypes_types.mli                     | 10 ++++++++--
 src/discover/discover.ml                        |  2 +-
 12 files changed, 83 insertions(+), 20 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 368f656..17c1633 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,3 +1,12 @@
+## 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.
diff --git a/META b/META
index e7eef53..8a68eb4 100644
--- a/META
+++ b/META
@@ -1,4 +1,4 @@
-version = "0.4"
+version = "0.4.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.4"
+  version = "0.4.1"
   description = "Toplevel printers for C types"
   requires = "ctypes"
   archive(byte) = "ctypes-top.cma"
@@ -19,7 +19,7 @@ package "top" (
 )
 
 package "stubs" (
-  version = "0.4"
+  version = "0.4.1"
   description = "Stub generation from C types"
   requires = "ctypes"
   archive(byte) = "cstubs.cma"
@@ -31,13 +31,13 @@ package "stubs" (
 )
 
 package "foreign" (
- version = "0.4"
+ version = "0.4.1"
  description = "Dynamic linking of C functions"
  requires(-mt) = "ctypes.foreign.unthreaded"
  requires(mt) = "ctypes.foreign.threaded"
 
  package "base" (
-  version = "0.4"
+  version = "0.4.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.4"
+  version = "0.4.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.4"
+  version = "0.4.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 b/Makefile
index 2280f26..4f44d9a 100644
--- a/Makefile
+++ b/Makefile
@@ -178,7 +178,18 @@ install: META-install $(PROJECTS:%=install-%)
 uninstall:
        $(OCAMLFIND) remove ctypes
 
-.PHONY: depend clean configure all install $(PROJECTS)
+DOCFILES=$(foreach project,$(PROJECTS),\
+           $(foreach mli,$($(project).public),\
+            $($(project).dir)/$(mli).mli))
+DOCFLAGS=$(foreach project,$(PROJECTS),-I $(BUILDDIR)/$($(project).dir))
+# Avoid passing duplicate interfaces to ocamldoc.
+DOCFILES:=$(filter-out src/ctypes-foreign-threaded/foreign.mli,$(DOCFILES))
+
+doc:
+       ocamldoc -html $(DOCFLAGS) $(DOCFILES)
+
+
+.PHONY: depend clean configure all install doc $(PROJECTS)
 
 include .depend Makefile.rules Makefile.examples Makefile.tests
 -include libffi.config
diff --git a/appveyor.yml b/appveyor.yml
index 73c3552..212c189 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -15,18 +15,17 @@ environment:
 
 init:
     - 'echo System architecture: %PLATFORM%'
+    - appveyor DownloadFile 
"http://ml.ignorelist.com/wodi/8/wodi%WODI_ARCH%.tar.xz"; -FileName 
"C:/wodi%WODI_ARCH%.tar.xz"
 
 install:
     - if not exist "%CYG_ROOT%" mkdir "%CYG_ROOT%"
     - appveyor DownloadFile "http://cygwin.com/setup-%CYG_ARCH%.exe"; -FileName 
"%CYG_ROOT%\setup.exe"
     - '"%CYG_ROOT%\setup.exe" -qnBWNd -R "%CYG_ROOT%" -P wget  -P dos2unix -P 
diffutils -P cpio -P make -P patch -P mingw64-%MINGW_ARCH%-gcc-core -P 
mingw64-%MINGW_ARCH%-gcc-g++ >NUL'
     - '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
-    - '%CYG_ROOT%/bin/bash -lc "wget -q 
http://ml.ignorelist.com/wodi/8/wodi%WODI_ARCH%.tar.xz -O 
/tmp/wodi%WODI_ARCH%.tar.xz"'
-    - '%CYG_ROOT%/bin/bash -lc "cd /tmp && rm -rf wodi%WODI_ARCH% && tar -xf 
wodi%WODI_ARCH%.tar.xz && bash wodi%WODI_ARCH%/install.sh"'
-    - '%CYG_ROOT%/bin/bash -lc "godi_add godi-ounit base-libffi"'
+    - '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && ./appveyor/install.sh 
%WODI_ARCH% %MINGW_ARCH% wodi%WODI_ARCH%.tar.xz"'
 
 build_script:
-    - '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && ./appveyor/build.sh"'
+    - '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && ./appveyor/build.sh 
%WODI_ARCH%"'
 
 artifacts:
   - path: test.log
diff --git a/appveyor/build.sh b/appveyor/build.sh
index 68f0971..351dd85 100755
--- a/appveyor/build.sh
+++ b/appveyor/build.sh
@@ -1,6 +1,8 @@
 #!/usr/bin/env bash
 set -ex
 
+WODI_ARCH=$1
+
 type -p ocamlc
 ocamlc -version
 
@@ -21,7 +23,8 @@ case "$x" in
         ;;
 esac
 
-godi_dir="$(dirname "$(godi_confdir)")"
+godi_dir=/opt/wodi${WODI_ARCH}
+export PATH=$godi_dir/sbin:$godi_dir/bin:$PATH
 
 export AR=${MINGW_TOOL_PREFIX}ar.exe
 export AS=${MINGW_TOOL_PREFIX}as.exe
diff --git a/appveyor/install.sh b/appveyor/install.sh
new file mode 100644
index 0000000..953db44
--- /dev/null
+++ b/appveyor/install.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+set -ex
+
+WODI_ARCH=$1
+MINGW_ARCH=$2
+WODI_FILE=$3
+
+echo "WODI_ARCH: ${WODI_ARCH}"
+echo "MINGW_ARCH: ${MINGW_ARCH}"
+echo "WODI_FILE: ${WODI_FILE}"
+
+cp C:/${WODI_FILE} /tmp
+
+pushd /tmp
+rm -rf wodi${WODI_ARCH}
+tar -xf wodi${WODI_ARCH}.tar.xz
+
+wodi${WODI_ARCH}/install.sh
+
+godi_dir=/opt/wodi${WODI_ARCH}
+export PATH=$godi_dir/sbin:$godi_dir/bin:$PATH
+godi_add godi-ounit base-libffi
+popd
+
+
diff --git a/src/cstubs/cstubs.mli b/src/cstubs/cstubs.mli
index 9510cfe..a1c5f6f 100644
--- a/src/cstubs/cstubs.mli
+++ b/src/cstubs/cstubs.mli
@@ -39,7 +39,7 @@ sig
         The value [alist] is an association list of OCaml values and values
         retrieved by the [constant] function.  For example, to expose the enum
 
-          enum letters { A, B, C = 10, D }; 
+          enum letters \{ A, B, C = 10, D \}; 
 
         you might first retrieve the values of the enumeration constants:
 
diff --git a/src/ctypes-foreign-base/ctypes_foreign_basis.ml 
b/src/ctypes-foreign-base/ctypes_foreign_basis.ml
index 06b0eb0..1fe62e7 100644
--- a/src/ctypes-foreign-base/ctypes_foreign_basis.ml
+++ b/src/ctypes-foreign-base/ctypes_foreign_basis.ml
@@ -28,9 +28,10 @@ struct
     and format_typ = format_function_pointer fn in
     Ctypes_static.(view ~format_typ ~read ~write (ptr void))
 
-  let funptr_opt ?abi fn =
+  let funptr_opt ?abi ?name ?check_errno ?runtime_lock fn =
     let format_typ = format_function_pointer fn in
-    Ctypes_std_views.nullable_view ~format_typ (funptr ?abi fn) void
+    Ctypes_std_views.nullable_view ~format_typ
+      (funptr ?abi ?name ?check_errno ?runtime_lock fn) void
 
   let ptr_of_raw_ptr p = 
     Ctypes.ptr_of_raw_address (Ctypes_ptr.Raw.to_nativeint p)
diff --git a/src/ctypes-foreign-threaded/foreign.mli 
b/src/ctypes-foreign-threaded/foreign.mli
index e17192d..4d6b8cf 100644
--- a/src/ctypes-foreign-threaded/foreign.mli
+++ b/src/ctypes-foreign-threaded/foreign.mli
@@ -78,6 +78,9 @@ val funptr :
 
 val funptr_opt :
   ?abi:Libffi_abi.abi ->
+  ?name:string ->
+  ?check_errno:bool ->
+  ?runtime_lock:bool ->
   ('a -> 'b) Ctypes.fn ->
   ('a -> 'b) option Ctypes.typ
 (** Construct a function pointer type from a function type.
diff --git a/src/ctypes-foreign-unthreaded/foreign.mli 
b/src/ctypes-foreign-unthreaded/foreign.mli
index 6bbcb83..4d6b8cf 100644
--- a/src/ctypes-foreign-unthreaded/foreign.mli
+++ b/src/ctypes-foreign-unthreaded/foreign.mli
@@ -71,10 +71,16 @@ val funptr :
     passed using {!Ctypes.ocaml_string} and {!Ctypes.ocaml_bytes}, and must
     not call back into OCaml.  If the function pointer is used to call into
     OCaml from C then the [?runtime_lock] argument indicates whether the lock
-    should be acquired and held during the call. *)
+    should be acquired and held during the call.
+
+    @raise Dl.DL_error if [name] is not found in [?from] and [?stub] is
+    [false]. *)
 
 val funptr_opt :
   ?abi:Libffi_abi.abi ->
+  ?name:string ->
+  ?check_errno:bool ->
+  ?runtime_lock:bool ->
   ('a -> 'b) Ctypes.fn ->
   ('a -> 'b) option Ctypes.typ
 (** Construct a function pointer type from a function type.
diff --git a/src/ctypes/ctypes_types.mli b/src/ctypes/ctypes_types.mli
index 264caef..a800356 100644
--- a/src/ctypes/ctypes_types.mli
+++ b/src/ctypes/ctypes_types.mli
@@ -151,7 +151,8 @@ sig
 
   (** {4:pointer_types Pointer types} *)
 
-  (** {4 C-compatible pointers} *)
+  (** {5 C-compatible pointers} *)
+
   val ptr : 'a typ -> 'a Ctypes_static.ptr typ
   (** Construct a pointer type from an existing type (called the {i reference
       type}).  *)
@@ -177,7 +178,8 @@ sig
       except that null pointers appear in OCaml as [None].
   *)
 
-  (** {4 OCaml pointers} *)
+  (** {5 OCaml pointers} *)
+
   val ocaml_string : string Ctypes_static.ocaml typ
   (** Value representing the directly mapped storage of an OCaml string. *)
 
@@ -185,6 +187,7 @@ sig
   (** Value representing the directly mapped storage of an OCaml byte array. *)
 
   (** {3 Array types} *)
+
   (** {4 C array types} *)
 
   val array : int -> 'a typ -> 'a Ctypes_static.carray typ
@@ -208,6 +211,7 @@ sig
       [k]. *)
 
   (** {3 Struct and union types} *)
+
   type ('a, 't) field
 
   val structure : string -> 's Ctypes_static.structure typ
@@ -284,11 +288,13 @@ sig
   *)
 
   (** {3 Abstract types} *)
+
   val abstract : name:string -> size:int -> alignment:int -> 'a 
Ctypes_static.abstract typ
   (** Create an abstract type specification from the size and alignment
       requirements for the type. *)
 
   (** {3 Injection of concrete types} *)
+
   val lift_typ : 'a Ctypes_static.typ -> 'a typ
   (** [lift_typ t] turns a concrete type representation into an abstract type
       representation.
diff --git a/src/discover/discover.ml b/src/discover/discover.ml
index f936173..9db78ff 100644
--- a/src/discover/discover.ml
+++ b/src/discover/discover.ml
@@ -194,7 +194,7 @@ let search_libffi_header () =
 let test_libffi setup_data have_pkg_config =
   let get var = try Some (split (Sys.getenv var)) with Not_found -> None in
   let opt, lib =
-    match get "LIBFFI_CFLAGS", get "LBIFFI_LIBS" with
+    match get "LIBFFI_CFLAGS", get "LIBFFI_LIBS" with
     | Some opt, Some lib -> (opt, lib)
     | envopt, envlib ->
       let opt, lib =

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