summaryrefslogtreecommitdiffstats
path: root/byterun/md5.c
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2003-12-29 22:15:02 +0000
committerDamien Doligez <damien.doligez-inria.fr>2003-12-29 22:15:02 +0000
commit31943bac1db3351118c7f911db99bd567f02a883 (patch)
tree053244070a0a7f612d637a0547f0d851a2dd024a /byterun/md5.c
parentdbf40e0b61af6f34d4a2736be1f0562ee5e8a52f (diff)
depollution suite (PR#1914 et PR#1956); byterun/weak.c: PR#1929 suite
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6041 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/md5.c')
-rw-r--r--byterun/md5.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/byterun/md5.c b/byterun/md5.c
index 9e38c5b32..b9dc43c43 100644
--- a/byterun/md5.c
+++ b/byterun/md5.c
@@ -29,7 +29,7 @@ CAMLprim value md5_string(value str, value ofs, value len)
value res;
MD5Init(&ctx);
MD5Update(&ctx, &Byte_u(str, Long_val(ofs)), Long_val(len));
- res = alloc_string(16);
+ res = caml_alloc_string(16);
MD5Final(&Byte_u(res, 0), &ctx);
return res;
}
@@ -47,20 +47,20 @@ CAMLprim value md5_chan(value vchan, value len)
toread = Long_val(len);
if (toread < 0){
while (1){
- read = getblock (chan, buffer, sizeof(buffer));
+ read = caml_getblock (chan, buffer, sizeof(buffer));
if (read == 0) break;
MD5Update (&ctx, (unsigned char *) buffer, read);
}
}else{
while (toread > 0) {
- read = getblock(chan, buffer,
- toread > sizeof(buffer) ? sizeof(buffer) : toread);
+ read = caml_getblock(chan, buffer,
+ toread > sizeof(buffer) ? sizeof(buffer) : toread);
if (read == 0) raise_end_of_file();
MD5Update(&ctx, (unsigned char *) buffer, read);
toread -= read;
}
}
- res = alloc_string(16);
+ res = caml_alloc_string(16);
MD5Final(&Byte_u(res, 0), &ctx);
Unlock(chan);
return res;