[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Variable Capture in message-digest
From: |
Andy Bennett |
Subject: |
[Chicken-users] Variable Capture in message-digest |
Date: |
Mon, 25 Apr 2016 17:55:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 |
Hi,
I've been using the message-digest egg and have happened upon an
unfortunate scenario.
Here is my minimal test case:
-----
(use message-digest sha2)
(define (string->blob string)
(abort "no way"))
(define digest (initialize-message-digest (sha256-primitive)))
(assert (message-digest? digest))
(message-digest-update-object digest "x")
(pp (finalize-message-digest digest 'blob))
-----
This aborts with "no way" during the call to message-digest-update-object.
message-digest is expecting to get string->blob from the library
(http://api.call-cc.org/doc/library/string-%3Eblob ) but I'm reusing
that name in my program for something else.
Even tho' I define my string->blob after I (use message-digest), it
seems to affect the binding in the message-digest code.
Is this expected behaviour?
I'm using CHICKEN 4.9.0rc1 and it happens in both interpreted and
complied code.
Regards,
@ndy
--
address@hidden
http://www.ashurst.eu.org/
0290 DA75 E982 7D99 A51F E46A 387A 7695 7EBA 75FF
- [Chicken-users] Variable Capture in message-digest,
Andy Bennett <=