From b29ce687b37fb0e12e500d5ff704e7f12098c55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Mon, 26 Sep 2005 21:46:23 +0000 Subject: [PATCH] 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 --- Lib/guile/typemaps.i | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Lib/guile/typemaps.i b/Lib/guile/typemaps.i index f5fd2a65c..37e5485a0 100644 --- a/Lib/guile/typemaps.i +++ b/Lib/guile/typemaps.i @@ -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.