[Pkg-ocaml-maint-commits] [ocaml-zarith] 03/09: Imported Upstream version 1.4.1

Stéphane Glondu glondu at moszumanska.debian.org
Tue Jan 26 13:57:24 UTC 2016


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

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

commit e6156f45e6a02ab4246c22abc3d5337051fd759a
Author: Stephane Glondu <steph at glondu.net>
Date:   Tue Jan 26 14:39:07 2016 +0100

    Imported Upstream version 1.4.1
---
 Changes  |  4 ++++
 META     |  2 +-
 Makefile | 25 +++++++++++++++++++++++++
 caml_z.c |  3 ++-
 q.ml     |  4 ++--
 z_pp.pl  |  4 +++-
 6 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/Changes b/Changes
index 0d338bb..7f16b4d 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+Release 1.4.1 (2015-11-09):
+- Fixed ml_z_of_substring_base and Z.of_substring [Thomas Braibant]
+- Integrated Opam fix for Perl scripts [Thomas Braibant]
+
 Release 1.4 (2015-11-02):
 - Improvements to Q (using divexact) [Bertrand Jeannet]
 - Fixed div_2exp bug [Bertrand Jeannet]
diff --git a/META b/META
index 3c7784b..854de4b 100644
--- a/META
+++ b/META
@@ -1,5 +1,5 @@
 description = "Arbitrary precision integers"
 requires = ""
-version = "1.4"
+version = "1.4.1"
 archive(byte) = "zarith.cma"
 archive(native) = "zarith.cmxa"
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7c4c31f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,25 @@
+# generated by ./configure
+
+CC=gcc
+OCAMLC=ocamlc
+OCAMLOPT=ocamlopt
+OCAMLDEP=ocamldep
+OCAMLMKLIB=ocamlmklib
+OCAMLDOC=ocamldoc
+OCAMLFLAGS=
+OCAMLOPTFLAGS=
+OCAMLINC=
+CFLAGS=-I/home/mine/.opam/4.02.1/lib/ocaml  -DZ_OCAML_HASH -DZ_OCAML_COMPARE_EXT -DHAS_GMP -DZ_ELF -DZ_DOT_LABEL_PREFIX  -O3 -Wall -Wextra -I/home/mine/include -I/usr/local/include
+ASFLAGS=-DZ_OCAML_HASH -DZ_OCAML_COMPARE_EXT -DHAS_GMP -DZ_ELF -DZ_DOT_LABEL_PREFIX  
+LIBS=-L/home/mine/lib -L/usr/local/lib -lgmp
+ARCH=x86_64
+INSTALLDIR=/home/mine/.opam/4.02.1/lib
+AR=ar
+INSTALL=install
+OCAMLFIND=ocamlfind
+INSTMETH=findlib
+OBJSUFFIX=o
+HASOCAMLOPT=yes
+HASDYNLINK=yes
+
+include project.mak
diff --git a/caml_z.c b/caml_z.c
index 3dd2b87..b690a2a 100644
--- a/caml_z.c
+++ b/caml_z.c
@@ -609,7 +609,7 @@ CAMLprim value ml_z_of_substring_base(value b, value v, value offset, value leng
   /* sz is the length of the substring that has not been consumed above. */
   sz = end - d;
 #if Z_USE_NATINT
-  if (!sz) {
+  if (sz <= 0) {
     /* "+", "-", "0x" are parsed as 0. */
     r = Val_long(0);
   }
@@ -877,6 +877,7 @@ CAMLprim value ml_z_extract(value arg, value off, value len)
   value r;
   Z_DECL(arg);
   Z_MARK_OP;
+  MAYBE_UNUSED x;
   o = Long_val(off);
   l = Long_val(len);
   if (o < 0) caml_invalid_argument("Z.extract: negative bit offset");
diff --git a/q.ml b/q.ml
index 18292e4..d6e5f6c 100644
--- a/q.ml
+++ b/q.ml
@@ -98,8 +98,8 @@ let of_string s =
   try
     let i  = String.index s '/' in
     make
-      (Z.of_substring s 0 i)
-      (Z.of_substring s (i+1) (String.length s-i-1))
+      (Z.of_substring s ~pos:0 ~len:i)
+      (Z.of_substring s ~pos:(i+1) ~len:(String.length s-i-1))
   with Not_found ->
     if s = "inf" || s = "+inf" then inf
     else if s = "-inf" then minus_inf
diff --git a/z_pp.pl b/z_pp.pl
index 50341e4..ff10581 100755
--- a/z_pp.pl
+++ b/z_pp.pl
@@ -1,4 +1,6 @@
-#!/usr/bin/perl -W
+#!/usr/bin/env perl
+
+use warnings "all";
 
 # Simple preprocessor to fix @ASM directives in z.mlp and z.mlip, and
 # generate z.ml and z.mli

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



More information about the Pkg-ocaml-maint-commits mailing list