Defined SWIG_exception for for CHICKEN.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4315 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Jonah Beckford 2003-02-15 01:59:47 +00:00
commit d85ba4faa6

View file

@ -250,4 +250,22 @@ static void _SWIG_exception(int code, const char *msg) {
%}
#endif
#ifdef SWIGCHICKEN
%{
#define CHICKEN_MSG_BUF_LEN 1024
static void _SWIG_exception(int code, const char *msg) {
char msg_buf[CHICKEN_MSG_BUF_LEN];
C_word *a;
C_word scmmsg;
sprintf (msg_buf, "Exception(%d): %.950s\n", code, msg);
a = C_alloc (C_SIZEOF_STRING (strlen (msg_buf)));
scmmsg = C_string2 (&a, msg_buf);
C_halt (scmmsg);
}
#define SWIG_exception(a,b) _SWIG_exception((a),(b))
%}
#endif
/* exception.i ends here */