#include <wchar.h>
#include "wchar.h"
-wchar_t*
+SCM
+scm_from_wide_char_string (const wchar_t* text)
+{
+ return scm_from_utf32_string ((const scm_t_wchar*) text);
+}
+
+const wchar_t*
scm_to_wide_char_string (SCM text)
{
- char* ctext = scm_to_utf8_stringn (text, NULL);
- wchar_t* wtext = (wchar_t*)malloc ((strlen (ctext) + 1) * sizeof (wchar_t));
- mbstowcs (wtext, ctext, strlen (ctext) + 1);
- return wtext;
+ return (const wchar_t*) scm_to_utf32_string (text);
}