diff options
author | Ian Thompson <quornian@googlemail.com> | 2008-08-12 14:08:46 +0400 |
---|---|---|
committer | Ian Thompson <quornian@googlemail.com> | 2008-08-12 14:08:46 +0400 |
commit | 0410775e2ed739a580a2a7cc7ff4a7ae374c24b1 (patch) | |
tree | e2651f004c88b12b10c2624bca39be47c79d676c /source/blender/python | |
parent | d90d413421a39e6c5b96fbe483090a13bc9a4569 (diff) | |
parent | 83bcb9deffb5eef2cbbb883c21f700840175d3fc (diff) |
Rolled back on rev. 16039. Had problems with display, messages being blank and scripts not being recompiled in some cases. Needs more thought before committing.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/BPY_extern.h | 1 | ||||
-rw-r--r-- | source/blender/python/BPY_interface.c | 28 |
2 files changed, 0 insertions, 29 deletions
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index a8b9cb48c16..3d9b45051fb 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -89,7 +89,6 @@ extern "C" { int BPY_Err_getLinenumber( void ); const char *BPY_Err_getFilename( void ); - const char *BPY_Err_getMessage( void ); int BPY_txt_do_python_Text( struct Text *text ); int BPY_menu_do_python( short menutype, int event ); diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index 635bdfe2d3c..05ea2d77ab9 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -145,11 +145,9 @@ static struct _inittab BPy_Inittab_Modules[] = { * Structure definitions **************************************************************************/ #define FILENAME_LENGTH 24 -#define MESSAGE_LENGTH 256 typedef struct _ScriptError { char filename[FILENAME_LENGTH]; - char message[MESSAGE_LENGTH+1]; int lineno; } ScriptError; @@ -510,15 +508,6 @@ const char *BPY_Err_getFilename( void ) } /*****************************************************************************/ -/* Description: This function will return the short message of the error */ -/* that has occured in the python script. */ -/*****************************************************************************/ -const char *BPY_Err_getMessage( void ) -{ - return g_script_error.message; -} - -/*****************************************************************************/ /* Description: Return PyString filename from a traceback object */ /*****************************************************************************/ PyObject *traceback_getFilename( PyObject * tb ) @@ -577,15 +566,6 @@ void BPY_Err_Handle( char *script_name ) } else { g_script_error.lineno = -1; } - v = PyObject_GetAttrString( err, "text" ); - if ( v && PyString_Check(v) ) { - strcpy(g_script_error.message, "Invalid syntax: "); - strncpy(g_script_error.message+16, PyString_AS_STRING( v ), MESSAGE_LENGTH-16); - g_script_error.message[MESSAGE_LENGTH]= '\0'; - Py_DECREF( v ); - } else { - strcpy(g_script_error.message, "Invalid Syntax"); - } /* this avoids an abort in Python 2.3's garbage collecting: */ PyErr_Clear( ); return; @@ -632,14 +612,6 @@ void BPY_Err_Handle( char *script_name ) FILENAME_LENGTH ); Py_DECREF(v); } - v = PyObject_GetAttrString( err, "message" ); - if ( v && PyString_Check(v) ) { - strncpy(g_script_error.message, PyString_AS_STRING( v ), MESSAGE_LENGTH); - g_script_error.message[MESSAGE_LENGTH]= '\0'; - Py_DECREF( v ); - } else { - g_script_error.message[0] = '\0'; - } Py_DECREF( tb ); } |