From d583ccd13af4f82626320919fd8dafec065abe91 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Tue, 23 May 2017 16:43:28 -0700 Subject: [PATCH] test-ffi-wrapper: c-peek-cstring can now return a legacy string. --- tests/ffi/test-ffi-wrapper.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ffi/test-ffi-wrapper.scm b/tests/ffi/test-ffi-wrapper.scm index 193ba762c..746adb325 100644 --- 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") -- 2.25.1