diff options
Diffstat (limited to 'byterun/md5.c')
-rw-r--r-- | byterun/md5.c | 10 |
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; |