Some updates to the chicken documenatation, a few more fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7080 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
92df04c40b
commit
fa7c87f4bb
6 changed files with 136 additions and 55 deletions
|
|
@ -27,6 +27,7 @@ extern "C" {
|
|||
#define SWIG_NewPointerObj(ptr, type, owner) \
|
||||
SWIG_Chicken_NewPointerObj((void*)ptr, type, owner, &known_space)
|
||||
#define swig_barf SWIG_Chicken_Barf
|
||||
#define SWIG_ThrowException(val) SWIG_Chicken_ThrowException(val)
|
||||
|
||||
#define SWIG_contract_assert(expr, message) if (!(expr)) { \
|
||||
SWIG_Chicken_Barf(SWIG_BARF1_CONTRACT_ASSERT, C_text(message)); } else
|
||||
|
|
@ -188,7 +189,7 @@ static void SWIG_Chicken_ThrowException(C_word value)
|
|||
|
||||
abort = C_block_item(abort, 0);
|
||||
if (C_immediatep(abort))
|
||||
SWIG_Chicken_Panic(C_text("`##sys#abort' is not defiend"));
|
||||
SWIG_Chicken_Panic(C_text("`##sys#abort' is not defined"));
|
||||
|
||||
C_save(value);
|
||||
C_do_apply(1, abort, C_SCHEME_UNDEFINED);
|
||||
|
|
|
|||
|
|
@ -252,17 +252,15 @@ SWIGINTERN void SWIG_exception_(int code, const char *msg) {
|
|||
|
||||
#ifdef SWIGCHICKEN
|
||||
%{
|
||||
#define CHICKEN_MSG_BUF_LEN 1024
|
||||
SWIGINTERN void SWIG_exception_(int code, const char *msg) {
|
||||
char msg_buf[CHICKEN_MSG_BUF_LEN];
|
||||
C_word *a;
|
||||
C_word scmmsg;
|
||||
C_word list;
|
||||
|
||||
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);
|
||||
a = C_alloc (C_SIZEOF_STRING (strlen (msg)) + C_SIZEOF_LIST(2));
|
||||
scmmsg = C_string2 (&a, (char *) msg);
|
||||
list = C_list(&a, 2, C_fix(code), scmmsg);
|
||||
SWIG_ThrowException(list);
|
||||
}
|
||||
#define SWIG_exception(a,b) SWIG_exception_((a),(b))
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue