Fixes to comply with with ISO/IEC 14882:1998(E) 17.4.3.1.2 :

_SWIG_Exception => SWIG_Exception_


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5142 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2003-09-23 21:13:27 +00:00
commit 2c355228b8

View file

@ -46,7 +46,7 @@
#ifdef SWIGPYTHON #ifdef SWIGPYTHON
%{ %{
static void _SWIG_exception(int code, const char *msg) { static void SWIG_exception_(int code, const char *msg) {
switch(code) { switch(code) {
case SWIG_MemoryError: case SWIG_MemoryError:
PyErr_SetString(PyExc_MemoryError,msg); PyErr_SetString(PyExc_MemoryError,msg);
@ -84,13 +84,13 @@ static void _SWIG_exception(int code, const char *msg) {
} }
} }
#define SWIG_exception(a,b) { _SWIG_exception(a,b); SWIG_fail; } #define SWIG_exception(a,b) { SWIG_exception_(a,b); SWIG_fail; }
%} %}
#endif #endif
#ifdef SWIGGUILE #ifdef SWIGGUILE
%{ %{
static void _SWIG_exception (int code, const char *msg, static void SWIG_exception_ (int code, const char *msg,
const char *subr) { const char *subr) {
#define ERROR(scmerr) \ #define ERROR(scmerr) \
scm_error(gh_symbol2scm((char *) (scmerr)), \ scm_error(gh_symbol2scm((char *) (scmerr)), \
@ -118,14 +118,14 @@ static void _SWIG_exception(int code, const char *msg) {
#undef MAP #undef MAP
} }
#define SWIG_exception(a,b) _SWIG_exception(a, b, FUNC_NAME) #define SWIG_exception(a,b) SWIG_exception_(a, b, FUNC_NAME)
%} %}
#endif #endif
#ifdef SWIGMZSCHEME #ifdef SWIGMZSCHEME
%{ %{
static void _SWIG_exception (int code, const char *msg) { static void SWIG_exception_ (int code, const char *msg) {
#define ERROR(errname) \ #define ERROR(errname) \
scheme_signal_error(errname " (%s)", msg); scheme_signal_error(errname " (%s)", msg);
#define MAP(swigerr, errname) \ #define MAP(swigerr, errname) \
@ -150,7 +150,7 @@ static void _SWIG_exception(int code, const char *msg) {
#undef MAP #undef MAP
} }
#define SWIG_exception(a,b) _SWIG_exception(a, b) #define SWIG_exception(a,b) SWIG_exception_(a, b)
%} %}
#endif #endif
@ -195,18 +195,18 @@ static void SWIG_JavaException(JNIEnv *jenv, int code, const char *msg) {
#ifdef SWIGOCAML #ifdef SWIGOCAML
%{ %{
#define OCAML_MSG_BUF_LEN 1024 #define OCAML_MSG_BUF_LEN 1024
static void _SWIG_exception(int code, const char *msg) { static void SWIG_exception_(int code, const char *msg) {
char msg_buf[OCAML_MSG_BUF_LEN]; char msg_buf[OCAML_MSG_BUF_LEN];
sprintf( msg_buf, "Exception(%d): %s\n", code, msg ); sprintf( msg_buf, "Exception(%d): %s\n", code, msg );
failwith( msg_buf ); failwith( msg_buf );
} }
#define SWIG_exception(a,b) _SWIG_exception((a),(b)) #define SWIG_exception(a,b) SWIG_exception_((a),(b))
%} %}
#endif #endif
#ifdef SWIGRUBY #ifdef SWIGRUBY
%{ %{
static void _SWIG_exception(int code, const char *msg) { static void SWIG_exception_(int code, const char *msg) {
switch (code) { switch (code) {
case SWIG_MemoryError: case SWIG_MemoryError:
rb_raise(rb_eNoMemError, msg); rb_raise(rb_eNoMemError, msg);
@ -246,14 +246,14 @@ static void _SWIG_exception(int code, const char *msg) {
} }
} }
#define SWIG_exception(a, b) _SWIG_exception((a), (b)) #define SWIG_exception(a, b) SWIG_exception_((a), (b))
%} %}
#endif #endif
#ifdef SWIGCHICKEN #ifdef SWIGCHICKEN
%{ %{
#define CHICKEN_MSG_BUF_LEN 1024 #define CHICKEN_MSG_BUF_LEN 1024
static void _SWIG_exception(int code, const char *msg) { static void SWIG_exception_(int code, const char *msg) {
char msg_buf[CHICKEN_MSG_BUF_LEN]; char msg_buf[CHICKEN_MSG_BUF_LEN];
C_word *a; C_word *a;
C_word scmmsg; C_word scmmsg;
@ -264,7 +264,7 @@ static void _SWIG_exception(int code, const char *msg) {
scmmsg = C_string2 (&a, msg_buf); scmmsg = C_string2 (&a, msg_buf);
C_halt (scmmsg); C_halt (scmmsg);
} }
#define SWIG_exception(a,b) _SWIG_exception((a),(b)) #define SWIG_exception(a,b) SWIG_exception_((a),(b))
%} %}
#endif #endif