diff --git a/Examples/guile/multimap/example.i b/Examples/guile/multimap/example.i index f1d7974e4..21d7e5032 100644 --- a/Examples/guile/multimap/example.i +++ b/Examples/guile/multimap/example.i @@ -66,7 +66,7 @@ extern int count(char *bytes, int len, char c); /* Return the mutated string as a new object. */ %typemap(argout) (char *str, int len) { - SWIG_APPEND_VALUE(scm_mem2string($1,$2)); + SWIG_APPEND_VALUE(scm_from_locale_stringn($1,$2)); if ($1) scm_must_free($1); } diff --git a/Lib/cdata.i b/Lib/cdata.i index dbc1c42d2..22a6d9de8 100644 --- a/Lib/cdata.i +++ b/Lib/cdata.i @@ -17,7 +17,7 @@ typedef struct SWIGCDATA { #if SWIGGUILE %typemap(out) SWIGCDATA { - $result = scm_mem2string($1.data,$1.len); + $result = scm_from_locale_stringn($1.data,$1.len); } %typemap(in) (const void *indata, int inlen) = (char *STRING, int LENGTH); #elif SWIGCHICKEN diff --git a/Lib/exception.i b/Lib/exception.i index 867ecdbff..050042dab 100644 --- a/Lib/exception.i +++ b/Lib/exception.i @@ -24,7 +24,7 @@ SWIGINTERN void SWIG_exception_ (int code, const char *msg, const char *subr) { #define ERROR(scmerr) \ - scm_error(scm_str2symbol((char *) (scmerr)), \ + scm_error(scm_from_locale_string((char *) (scmerr)), \ (char *) subr, (char *) msg, \ SCM_EOL, SCM_BOOL_F) #define MAP(swigerr, scmerr) \ diff --git a/Lib/guile/typemaps.i b/Lib/guile/typemaps.i index ab655eb9a..ba447ac28 100644 --- a/Lib/guile/typemaps.i +++ b/Lib/guile/typemaps.i @@ -60,25 +60,25 @@ %typemap(throws) SWIGTYPE { $<ype temp = new $ltype($1); - scm_throw(scm_str2symbol((char *) "swig-exception"), + scm_throw(scm_from_locale_symbol((char *) "swig-exception"), scm_listify(SWIG_NewPointerObj(temp, $&descriptor, 1), SCM_UNDEFINED)); } %typemap(throws) SWIGTYPE & { - scm_throw(scm_str2symbol((char *) "swig-exception"), + scm_throw(scm_from_locale_symbol((char *) "swig-exception"), scm_listify(SWIG_NewPointerObj(&$1, $descriptor, 1), SCM_UNDEFINED)); } %typemap(throws) SWIGTYPE * { - scm_throw(scm_str2symbol((char *) "swig-exception"), + scm_throw(scm_from_locale_symbol((char *) "swig-exception"), scm_listify(SWIG_NewPointerObj($1, $descriptor, 1), SCM_UNDEFINED)); } %typemap(throws) SWIGTYPE [] { - scm_throw(scm_str2symbol((char *) "swig-exception"), + scm_throw(scm_from_locale_symbol((char *) "swig-exception"), scm_listify(SWIG_NewPointerObj($1, $descriptor, 1), SCM_UNDEFINED)); } @@ -151,7 +151,7 @@ enums, which cannot be cast to. */ %typemap(varin) enum SWIGTYPE { if (sizeof(int) != sizeof($1)) { - scm_error(scm_str2symbol("swig-error"), + scm_error(scm_from_locale_symbol("swig-error"), (char *) FUNC_NAME, (char *) "enum variable '$name' cannot be set", SCM_EOL, SCM_BOOL_F); @@ -161,7 +161,7 @@ %typemap(out) enum SWIGTYPE { $result = scm_from_long($1); } %typemap(varout) enum SWIGTYPE { $result = scm_from_long($1); } %typemap(throws) enum SWIGTYPE { - scm_throw(scm_str2symbol((char *) "swig-exception"), + scm_throw(scm_from_locale_symbol((char *) "swig-exception"), scm_listify(scm_from_long($1), SCM_UNDEFINED)); } @@ -210,7 +210,7 @@ /* Throw typemap */ %typemap(throws) C_NAME { C_NAME swig_c_value = $1; - scm_throw(scm_str2symbol((char *) "swig-exception"), + scm_throw(scm_from_locale_symbol((char *) "swig-exception"), scm_listify(C_TO_SCM_EXPR, SCM_UNDEFINED)); } %enddef @@ -254,7 +254,7 @@ } /* Throw typemap */ %typemap(throws) C_NAME { - scm_throw(scm_str2symbol((char *) "swig-exception"), + scm_throw(scm_from_locale_symbol((char *) "swig-exception"), scm_listify(C_TO_SCM($1), SCM_UNDEFINED)); } %enddef @@ -329,7 +329,7 @@ SIMPLE_MAP(unsigned long long, scm_to_ulong_long, scm_from_ulong_long, integer); } %typemap(throws) char * { - scm_throw(scm_str2symbol((char *) "swig-exception"), + scm_throw(scm_from_locale_symbol((char *) "swig-exception"), scm_listify(SWIG_str02scm($1), SCM_UNDEFINED)); }