diff options
author | Steve Bennett <steveb@workware.net.au> | 2013-07-22 12:44:13 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2013-07-22 13:51:32 +1000 |
commit | 7f77a94148b842133903804424882f6f031385fb (patch) | |
tree | ebcd0f12f0ac6e46233b96015dbdd3ecfe3f1463 | |
parent | dff18cd0b2a62ac551587c6962f8db47851e7290 (diff) | |
download | jimtcl-7f77a94148b842133903804424882f6f031385fb.zip jimtcl-7f77a94148b842133903804424882f6f031385fb.tar.gz jimtcl-7f77a94148b842133903804424882f6f031385fb.tar.bz2 |
Make Jim_CheckSignal() a macro
For performance reasons
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r-- | jim.c | 9 | ||||
-rw-r--r-- | jim.h | 5 |
2 files changed, 5 insertions, 9 deletions
@@ -13679,15 +13679,6 @@ static int Jim_ExitCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *arg return JIM_EXIT; } -/** - * Returns 1 if a signal has been received while - * in a catch -signal {} clause. - */ -int Jim_CheckSignal(Jim_Interp *interp) -{ - return interp->signal_level && interp->sigmask; -} - /* [catch] */ static int Jim_CatchCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { @@ -908,6 +908,11 @@ JIM_EXPORT void Jim_HistoryShow(void); JIM_EXPORT int Jim_InitStaticExtensions(Jim_Interp *interp); JIM_EXPORT int Jim_StringToWide(const char *str, jim_wide *widePtr, int base); JIM_EXPORT int Jim_CheckSignal(Jim_Interp *interp); +/** + * Returns 1 if a signal has been received while + * in a catch -signal {} clause. + */ +#define Jim_CheckSignal(i) ((i)->signal_level && (i)->sigmask) /* jim-load.c */ JIM_EXPORT int Jim_LoadLibrary(Jim_Interp *interp, const char *pathName); |