From 8ab08cf0287afabe17492bb47bce8528820a5d63 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 4 Jan 2007 13:55:35 +0100 Subject: [PATCH] add ly_string2scm() --- lily/lily-guile.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 11d21765a2..0aa93904c9 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -45,7 +45,7 @@ ly_to_string (SCM scm) { return scm_call_3 (ly_lily_module_constant ("format"), SCM_BOOL_F, - scm_makfrom0str ("~S"), scm); + scm_from_locale_string ("~S"), scm); } SCM @@ -129,6 +129,14 @@ ly_scm2string (SCM str) (int) scm_i_string_length (str)); } +SCM +ly_string2scm (string str) +{ + return scm_from_locale_stringn (str.c_str(), + str.length ()); +} + + char * ly_scm2newstr (SCM str, size_t *lenp) { -- 2.39.2