From: Han-Wen Nienhuys Date: Thu, 4 Jan 2007 12:55:35 +0000 (+0100) Subject: add ly_string2scm() X-Git-Tag: release/2.11.9-1~47 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8ab08cf0287afabe17492bb47bce8528820a5d63;p=lilypond.git add ly_string2scm() --- 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) {