From bde72ee4d5a90196429f32702acdd1219d62b238 Mon Sep 17 00:00:00 2001 From: Damien Doligez Date: Tue, 13 Apr 2004 17:12:46 +0000 Subject: [PATCH] PR#2328 git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6201 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- byterun/extern.c | 6 +++--- camlp4/lib/plexer.ml | 3 +++ configure | 1 + otherlibs/str/str.mli | 10 +++++++--- stdlib/sys.ml | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/byterun/extern.c b/byterun/extern.c index 2faeb9e85..35c796933 100644 --- a/byterun/extern.c +++ b/byterun/extern.c @@ -332,7 +332,7 @@ static void extern_rec(value v) break; } case Abstract_tag: - extern_invalid_argument("output_value: abstract value"); + extern_invalid_argument("output_value: abstract value (Abstract)"); break; case Infix_tag: writecode32(CODE_INFIXPOINTER, Infix_offset_hd(hd)); @@ -348,7 +348,7 @@ static void extern_rec(value v) unsigned long * wsize_64) = Custom_ops_val(v)->serialize; if (serialize == NULL) - extern_invalid_argument("output_value: abstract value"); + extern_invalid_argument("output_value: abstract value (Custom)"); Write(CODE_CUSTOM); writeblock(ident, strlen(ident) + 1); Custom_ops_val(v)->serialize(v, &sz_32, &sz_64); @@ -383,7 +383,7 @@ static void extern_rec(value v) writeblock((char *) caml_code_checksum(), 16); return; } - extern_invalid_argument("output_value: abstract value"); + extern_invalid_argument("output_value: abstract value (outside heap)"); } enum { NO_SHARING = 1, CLOSURES = 2 }; diff --git a/camlp4/lib/plexer.ml b/camlp4/lib/plexer.ml index 329380b26..dcd1986c1 100644 --- a/camlp4/lib/plexer.ml +++ b/camlp4/lib/plexer.ml @@ -88,6 +88,9 @@ and digits_under kind len = parser [ [: d = kind; s :] -> digits_under kind (store len d) s | [: `'_'; s :] -> digits_under kind len s + | [: `'l' :] -> ("INT32", get_buff len) + | [: `'L' :] -> ("INT64", get_buff len) + | [: `'n' :] -> ("NATIVEINT", get_buff len) | [: :] -> ("INT", get_buff len) ] and octal = parser [ [: `('0'..'7' as d) :] -> d ] and hexa = parser [ [: `('0'..'9' | 'a'..'f' | 'A'..'F' as d) :] -> d ] diff --git a/configure b/configure index 2c7102d6b..860dc5938 100755 --- a/configure +++ b/configure @@ -562,6 +562,7 @@ case "$host" in ia64-*-linux*) arch=ia64; system=linux;; ia64-*-freebsd*) arch=ia64; system=freebsd;; amd64-*-freebsd*) arch=amd64; system=freebsd;; + x86_64-*-freebsd*) arch=amd64; system=freebsd;; x86_64-*-linux*) arch=amd64; system=linux;; esac diff --git a/otherlibs/str/str.mli b/otherlibs/str/str.mli index 95228dc1c..30ab018b0 100644 --- a/otherlibs/str/str.mli +++ b/otherlibs/str/str.mli @@ -78,15 +78,19 @@ val string_match : regexp -> string -> int -> bool The first character of a string has position [0], as usual. *) val search_forward : regexp -> string -> int -> int -(** [search_forward r s start] searchs the string [s] for a substring +(** [search_forward r s start] searches the string [s] for a substring matching the regular expression [r]. The search starts at position [start] and proceeds towards the end of the string. Return the position of the first character of the matched substring, or raise [Not_found] if no substring matches. *) val search_backward : regexp -> string -> int -> int -(** Same as {!Str.search_forward}, but the search proceeds towards the - beginning of the string. *) +(** [search_backward r s last] searches the string [s] for a + substring matching the regular expression [r]. The search first + considers substrings that start at position [last] and proceeds + towards the beginning of string. Return the position of the first + character of the matched substring; raise [Not_found] if no + substring matches. *) val string_partial_match : regexp -> string -> int -> bool (** Similar to {!Str.string_match}, but succeeds whenever the argument diff --git a/stdlib/sys.ml b/stdlib/sys.ml index 084e82097..e4b37615b 100644 --- a/stdlib/sys.ml +++ b/stdlib/sys.ml @@ -78,4 +78,4 @@ let catch_break on = (* OCaml version string, must be in the format described in sys.mli. *) -let ocaml_version = "3.07+15 (2004-01-04)";; +let ocaml_version = "3.07+16 (2004-04-13)";;