projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3021721
)
test-ffi-wrapper: c-peek-cstring can now return a legacy string.
author
Matt Birkholz
<matt@birchwood-abbey.net>
Tue, 23 May 2017 23:43:28 +0000
(16:43 -0700)
committer
Matt Birkholz
<matt@birchwood-abbey.net>
Tue, 23 May 2017 23:43:28 +0000
(16:43 -0700)
tests/ffi/test-ffi-wrapper.scm
patch
|
blob
|
history
diff --git
a/tests/ffi/test-ffi-wrapper.scm
b/tests/ffi/test-ffi-wrapper.scm
index 193ba762c9834218acf9195c7a124b5a07a7975f..746adb325d0839d4b3effc1544aaaee43d9fdef3 100644
(file)
--- a/
tests/ffi/test-ffi-wrapper.scm
+++ b/
tests/ffi/test-ffi-wrapper.scm
@@
-37,7
+37,9
@@
bytevector struct))))
(new (c-peek-cstring alien)))
(free alien)
- (utf8->string new)))
+ (if (string? new)
+ new
+ (utf8->string new))))
(let ((a (C-call "test_struct" struct struct)))
(assert-equal a struct)
(assert-equal (C-> a "TestStruct second")