CHECK_ARG (2, STRING_P);
{
SCHEME_OBJECT string = (ARG_REF (2));
- unsigned long l = (STRING_LENGTH (string));
- unsigned long start = (arg_ulong_index_integer (3, l));
- unsigned long end = (arg_integer_in_range (4, start, (l + 1)));
+ unsigned long end
+ = (arg_ulong_index_integer (4, ((STRING_LENGTH (string)) + 1)));
+ unsigned long start = (arg_ulong_index_integer (3, (end + 1)));
MD5_UPDATE ((md5_context_arg (1)),
(STRING_LOC (string, start)),
(end - start));
CHECK_ARG (2, STRING_P);
{
SCHEME_OBJECT string = (ARG_REF (2));
- unsigned long l = (STRING_LENGTH (string));
- unsigned long start = (arg_ulong_index_integer (3, l));
- unsigned long end = (arg_integer_in_range (4, start, (l + 1)));
+ unsigned long end = (arg_ulong_index_integer (4, ((STRING_LENGTH (string)) + 1)));
+ unsigned long start = (arg_ulong_index_integer (3, (end + 1)));
mhash ((arg_context (1)), (STRING_LOC (string, start)), (end - start));
}
PRIMITIVE_RETURN (UNSPECIFIC);
(define (mhash-substring hash-type string start end)
(let ((context (mhash-init hash-type)))
- (if (fix:> end start)
- (mhash-update context string start end))
+ (mhash-update context string start end)
(mhash-end context)))
(define (mhash-sum->number sum)
(define (%md5-substring string start end)
(let ((context ((ucode-primitive md5-init 0))))
- (if (fix:> end start)
- ((ucode-primitive md5-update 4) context string start end))
+ ((ucode-primitive md5-update 4) context string start end)
((ucode-primitive md5-final 1) context)))
(define md5-sum->number mhash-sum->number)