Fix deprecation warnings for test suite under guile 2.0

This commit is contained in:
Geert Janssens 2013-04-19 18:57:31 +02:00
commit d689d9a860
4 changed files with 12 additions and 12 deletions

View file

@ -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);
}

View file

@ -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

View file

@ -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) \

View file

@ -60,25 +60,25 @@
%typemap(throws) SWIGTYPE {
$&ltype 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));
}