summaryrefslogtreecommitdiffstats
path: root/byterun/str.c
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1995-07-10 09:48:27 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1995-07-10 09:48:27 +0000
commitc226d5efeb43f25c7086e89733ec8073262aa2e0 (patch)
tree481cda5fe83465c0acf991782d8848ec867bd946 /byterun/str.c
parentbbbf6d016497de98d776934e20fbac905d48d6a1 (diff)
Branchement du GC de la version bytecode sur le compilateur natif
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@72 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/str.c')
-rw-r--r--byterun/str.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/byterun/str.c b/byterun/str.c
index 5e1ad99b8..a97a8d787 100644
--- a/byterun/str.c
+++ b/byterun/str.c
@@ -49,6 +49,24 @@ value string_set(str, index, newval) /* ML */
return Val_unit;
}
+value string_equal(s1, s2) /* ML */
+ value s1, s2;
+{
+ mlsize_t sz1 = Wosize_val(s1);
+ mlsize_t sz2 = Wosize_val(s2);
+ value * p1, * p2;
+ if (sz1 != sz2) return Val_false;
+ for(p1 = Op_val(s1), p2 = Op_val(s2); sz1 > 0; sz1--, p1++, p2++)
+ if (*p1 != *p2) return Val_false;
+ return Val_true;
+}
+
+value string_notequal(s1, s2) /* ML */
+ value s1, s2;
+{
+ return Val_not(string_equal(s1, s2));
+}
+
value blit_string(argv, argc) /* ML */
value * argv;
int argc;