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

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

commit 1d979bc8e19c92e078105bfa351ed416d5fb0a8d
Author: Stephane Glondu <st...@glondu.net>
Date:   Wed Aug 3 16:24:57 2016 +0200

    Imported Upstream version 0.7.1
---
 CHANGES                       | 4 ++++
 _oasis                        | 2 +-
 opam                          | 4 +++-
 syntax/common/utils.ml        | 3 +--
 syntax/std/pa_deriving_std.ml | 5 +++++
 5 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/CHANGES b/CHANGES
index f173d61..253dae1 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+== 0.7.1
+
+  * Compatibility with OCaml 4.03
+
 == 0.7
 
   * Compatibility with ocaml-4.02 (Peter Zotoz, Hugo Heuzard)
diff --git a/_oasis b/_oasis
index ba2d437..38a85ad 100644
--- a/_oasis
+++ b/_oasis
@@ -1,7 +1,7 @@
 OASISFormat: 0.4
 Name:        deriving
 OCamlVersion: >= 3.12.1
-Version:     0.7
+Version:     0.7.1
 Synopsis:    Extension to OCaml for deriving functions from type declarations
 Authors:     Jeremy Yallop
 License:     MIT
diff --git a/opam b/opam
index bf200f3..da07737 100644
--- a/opam
+++ b/opam
@@ -2,8 +2,10 @@ opam-version: "1.2"
 name: "deriving"
 version: "dev"
 maintainer: "d...@ocsigen.org"
-homepage: "http://ocsigen.org/deriving/";
+author: "Jeremy Yallop <yal...@gmail.com>"
+homepage: "http://github.com/ocsigen/deriving/";
 bug-reports: "https://github.com/ocsigen/deriving/issues/";
+dev-repo: "https://github.com/ocsigen/deriving.git";
 license: "MIT"
 build: [
   [ "./configure" "--prefix" prefix "--%{type_conv:enable}%-tc" ]
diff --git a/syntax/common/utils.ml b/syntax/common/utils.ml
index 67f88e0..913a40f 100644
--- a/syntax/common/utils.ml
+++ b/syntax/common/utils.ml
@@ -223,7 +223,6 @@ let random_id length =
    Garrigue's 1998 ML workshop paper.
 *)
 let tag_hash s =
-  let wrap = 0x40000000 in
   let acc = ref 0 in
   let len = String.length s in
     for i = 0 to len - 1 do
@@ -232,7 +231,7 @@ let tag_hash s =
         acc := (223 * !acc + n);
     done;
     acc := !acc land (1 lsl 31 - 1);
-    if !acc >= wrap then !acc - (1 lsl 31) else !acc
+    if !acc > 0x3fffffff then !acc - (1 lsl 31) else !acc
 
 let _ =
   (* Sanity check to make sure the function doesn't change underneath
diff --git a/syntax/std/pa_deriving_std.ml b/syntax/std/pa_deriving_std.ml
index 1ec000c..dde8d9e 100644
--- a/syntax/std/pa_deriving_std.ml
+++ b/syntax/std/pa_deriving_std.ml
@@ -18,8 +18,13 @@ struct
   open Camlp4.PreCast
   include Syntax
 
+#if ocaml_version >= (4, 03)
+  DELETE_RULE Gram str_item: "type"; opt_nonrec; type_declaration END
+  DELETE_RULE Gram sig_item: "type"; opt_nonrec; type_declaration END
+#else
   DELETE_RULE Gram str_item: "type"; type_declaration END
   DELETE_RULE Gram sig_item: "type"; type_declaration END
+#endif
 
   open Ast
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-ocaml-maint/packages/ocaml-deriving-ocsigen.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