Fix last change, add throw typemap for enums.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7536 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matthias Köppe 2005-09-26 21:46:23 +00:00
commit b29ce687b3

View file

@ -66,19 +66,19 @@
%typemap(throws) SWIGTYPE & {
scm_throw(gh_symbol2scm((char *) "swig-exception"),
gh_list(SWIG_NewPointerObj(&$1, $&descriptor, 1),
gh_list(SWIG_NewPointerObj(&$1, $descriptor, 1),
SCM_UNDEFINED));
}
%typemap(throws) SWIGTYPE * {
scm_throw(gh_symbol2scm((char *) "swig-exception"),
gh_list(SWIG_NewPointerObj($1, $&descriptor, 1),
gh_list(SWIG_NewPointerObj($1, $descriptor, 1),
SCM_UNDEFINED));
}
%typemap(throws) SWIGTYPE [] {
scm_throw(gh_symbol2scm((char *) "swig-exception"),
gh_list(SWIG_NewPointerObj($1, $&descriptor, 1),
gh_list(SWIG_NewPointerObj($1, $descriptor, 1),
SCM_UNDEFINED));
}
@ -159,6 +159,10 @@
}
%typemap(out) enum SWIGTYPE { $result = gh_int2scm($1); }
%typemap(varout) enum SWIGTYPE { $result = gh_int2scm($1); }
%typemap(throws) enum SWIGTYPE {
scm_throw(gh_symbol2scm((char *) "swig-exception"),
gh_list(gh_int2scm($1), SCM_UNDEFINED));
}
/* The SIMPLE_MAP_WITH_EXPR macro below defines the whole set of
typemaps needed for simple types.