Defined SWIG_exception for for CHICKEN.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4315 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0fb0009f66
commit
d03f4a7db7
1 changed files with 18 additions and 0 deletions
|
|
@ -250,4 +250,22 @@ static void _SWIG_exception(int code, const char *msg) {
|
||||||
%}
|
%}
|
||||||
#endif
|
#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 */
|
/* exception.i ends here */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue