From 3bee1a70ecfabc9622cd9f985d3ab6a9a2fd81d5 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Wed, 17 May 2017 16:12:22 -0700 Subject: [PATCH] runtime/crypto: Allow strings for module names; fix a string-append. --- src/runtime/crypto.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/crypto.scm b/src/runtime/crypto.scm index 81fc39c47..4bd204aba 100644 --- a/src/runtime/crypto.scm +++ b/src/runtime/crypto.scm @@ -353,8 +353,7 @@ USA. (guarantee-mcrypt-context context name) (let ((code (primitive (mcrypt-context-index context) bytes start end))) (if (not (eqv? code 0)) - (error (string-append "Error code signalled by " primitive ":") - code))))) + (error (string "Error code signalled by "name":") code))))) (define mcrypt-encrypt! (make-mcrypt-transform! 'mcrypt-encrypt! @@ -379,6 +378,7 @@ USA. (lambda (object) (cond ((mcrypt-context? object) (context-op (mcrypt-context-index object))) ((bytevector? object) (module-op object)) + ((string? object) (module-op (string->utf8 object))) (else (error:wrong-type-argument object "mcrypt context" name))))) (define mcrypt-self-test -- 2.25.1