diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-10-08 14:50:58 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-10-08 14:50:58 (GMT) |
commit | ecec02fb16d9d8b720987fb25ee1e517b085e699 (patch) | |
tree | 88180308a225069befe09d94a73f28e71cb26663 | |
parent | 124fe99bfd63f9d6b1d43685f7b89a42e4deec3d (diff) | |
parent | 404bcc3435d7a5ce178b4b84c86833285d3aa1d4 (diff) | |
download | tcl-ecec02fb16d9d8b720987fb25ee1e517b085e699.zip tcl-ecec02fb16d9d8b720987fb25ee1e517b085e699.tar.gz tcl-ecec02fb16d9d8b720987fb25ee1e517b085e699.tar.bz2 |
merge trunk
-rw-r--r-- | generic/tcl.decls | 4 | ||||
-rw-r--r-- | generic/tclDecls.h | 8 | ||||
-rw-r--r-- | generic/tclEvent.c | 8 | ||||
-rw-r--r-- | win/tclWinFile.c | 3 |
4 files changed, 11 insertions, 12 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls index 812a523..9067efb 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -487,7 +487,7 @@ declare 132 { void Tcl_EventuallyFree(ClientData clientData, Tcl_FreeProc *freeProc) } declare 133 { - void Tcl_Exit(int status) + TCL_NORETURN void Tcl_Exit(int status) } declare 134 { int Tcl_ExposeCommand(Tcl_Interp *interp, const char *hiddenCmdToken, @@ -1901,7 +1901,7 @@ declare 518 { # TIP#121 (exit handler) dkf for Joe Mistachkin declare 519 { - Tcl_ExitProc *Tcl_SetExitProc(Tcl_ExitProc *proc) + Tcl_ExitProc *Tcl_SetExitProc(TCL_NORETURN1 Tcl_ExitProc *proc) } # TIP#143 (resource limits) dkf diff --git a/generic/tclDecls.h b/generic/tclDecls.h index d33ccb8..fc4b441 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -391,7 +391,7 @@ TCLAPI const char * Tcl_ErrnoMsg(int err); TCLAPI void Tcl_EventuallyFree(ClientData clientData, Tcl_FreeProc *freeProc); /* 133 */ -TCLAPI void Tcl_Exit(int status); +TCLAPI TCL_NORETURN void Tcl_Exit(int status); /* 134 */ TCLAPI int Tcl_ExposeCommand(Tcl_Interp *interp, const char *hiddenCmdToken, @@ -1414,7 +1414,7 @@ TCLAPI void Tcl_GetCommandFullName(Tcl_Interp *interp, TCLAPI int Tcl_FSEvalFileEx(Tcl_Interp *interp, Tcl_Obj *fileName, const char *encodingName); /* 519 */ -TCLAPI Tcl_ExitProc * Tcl_SetExitProc(Tcl_ExitProc *proc); +TCLAPI Tcl_ExitProc * Tcl_SetExitProc(TCL_NORETURN1 Tcl_ExitProc *proc); /* 520 */ TCLAPI void Tcl_LimitAddHandler(Tcl_Interp *interp, int type, Tcl_LimitHandlerProc *handlerProc, @@ -1892,7 +1892,7 @@ typedef struct TclStubs { void (*reserved130)(void); void (*reserved131)(void); void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc *freeProc); /* 132 */ - void (*tcl_Exit) (int status); /* 133 */ + TCL_NORETURN1 void (*tcl_Exit) (int status); /* 133 */ int (*tcl_ExposeCommand) (Tcl_Interp *interp, const char *hiddenCmdToken, const char *cmdName); /* 134 */ int (*tcl_ExprBoolean) (Tcl_Interp *interp, const char *expr, int *ptr); /* 135 */ int (*tcl_ExprBooleanObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *ptr); /* 136 */ @@ -2286,7 +2286,7 @@ typedef struct TclStubs { Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 516 */ void (*tcl_GetCommandFullName) (Tcl_Interp *interp, Tcl_Command command, Tcl_Obj *objPtr); /* 517 */ int (*tcl_FSEvalFileEx) (Tcl_Interp *interp, Tcl_Obj *fileName, const char *encodingName); /* 518 */ - Tcl_ExitProc * (*tcl_SetExitProc) (Tcl_ExitProc *proc); /* 519 */ + Tcl_ExitProc * (*tcl_SetExitProc) (TCL_NORETURN1 Tcl_ExitProc *proc); /* 519 */ void (*tcl_LimitAddHandler) (Tcl_Interp *interp, int type, Tcl_LimitHandlerProc *handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc *deleteProc); /* 520 */ void (*tcl_LimitRemoveHandler) (Tcl_Interp *interp, int type, Tcl_LimitHandlerProc *handlerProc, ClientData clientData); /* 521 */ int (*tcl_LimitReady) (Tcl_Interp *interp); /* 522 */ diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 2bb91d7..5457ae0 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -89,7 +89,7 @@ static int subsystemsInitialized = 0; * non-NULL value. */ -static Tcl_ExitProc *appExitPtr = NULL; +static TCL_NORETURN1 Tcl_ExitProc *appExitPtr = NULL; typedef struct ThreadSpecificData { ExitHandler *firstExitPtr; /* First in list of all exit handlers for this @@ -857,7 +857,7 @@ Tcl_DeleteThreadExitHandler( Tcl_ExitProc * Tcl_SetExitProc( - Tcl_ExitProc *proc) /* New exit handler for app or NULL */ + TCL_NORETURN1 Tcl_ExitProc *proc) /* New exit handler for app or NULL */ { Tcl_ExitProc *prevExitProc; @@ -933,12 +933,12 @@ InvokeExitHandlers(void) *---------------------------------------------------------------------- */ -void +TCL_NORETURN void Tcl_Exit( int status) /* Exit status for application; typically 0 * for normal return, 1 for error return. */ { - Tcl_ExitProc *currentAppExitPtr; + TCL_NORETURN1 Tcl_ExitProc *currentAppExitPtr; Tcl_MutexLock(&exitMutex); currentAppExitPtr = appExitPtr; diff --git a/win/tclWinFile.c b/win/tclWinFile.c index be9c947..25c6ea4 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -1467,8 +1467,7 @@ TclpGetUserHome( * User exists but has no home dir. Return * "{GetProfilesDirectory}/<user>". */ - DWORD size = MAX_PATH; - int i; + DWORD i, size = MAX_PATH; GetProfilesDirectoryW(buf, &size); for (i = 0; i < size; ++i){ if (buf[i] == '\\') buf[i] = '/'; |