diff options
author | fvogel <fvogelnew1@free.fr> | 2016-11-05 12:04:26 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-11-05 12:04:26 (GMT) |
commit | f58782e964943a3a977716bf65ee3b6cedafde06 (patch) | |
tree | d07a21bbd6bd79fea3cdcf68e03c74b63f29d59d /generic/tkConsole.c | |
parent | f82b718e135c44bb8bb4865ac5cbb0272502de66 (diff) | |
parent | 2da9e225ec7604a5ad4e4dc46e76d090d733b87c (diff) | |
download | tk-f58782e964943a3a977716bf65ee3b6cedafde06.zip tk-f58782e964943a3a977716bf65ee3b6cedafde06.tar.gz tk-f58782e964943a3a977716bf65ee3b6cedafde06.tar.bz2 |
Close unintended fork
Diffstat (limited to 'generic/tkConsole.c')
-rw-r--r-- | generic/tkConsole.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c index 8bfbe9b..fc60d5f 100644 --- a/generic/tkConsole.c +++ b/generic/tkConsole.c @@ -24,7 +24,7 @@ typedef struct ConsoleInfo { Tcl_Interp *consoleInterp; /* Interpreter displaying the console. */ Tcl_Interp *interp; /* Interpreter controlled by console. */ - int refCount; + size_t refCount; } ConsoleInfo; /* @@ -452,7 +452,7 @@ Tk_CreateConsoleWindow( if (mainWindow) { Tk_DeleteEventHandler(mainWindow, StructureNotifyMask, ConsoleEventProc, info); - if (--info->refCount <= 0) { + if (info->refCount-- <= 1) { ckfree(info); } } @@ -592,7 +592,7 @@ ConsoleClose( ConsoleInfo *info = data->info; if (info) { - if (--info->refCount <= 0) { + if (info->refCount-- <= 1) { /* * Assuming the Tcl_Interp * fields must already be NULL. */ @@ -881,7 +881,7 @@ InterpDeleteProc( Tcl_DeleteThreadExitHandler(DeleteConsoleInterp, info->consoleInterp); info->consoleInterp = NULL; } - if (--info->refCount <= 0) { + if (info->refCount-- <= 1) { ckfree(info); } } @@ -912,7 +912,7 @@ ConsoleDeleteProc( if (info->consoleInterp) { Tcl_DeleteInterp(info->consoleInterp); } - if (--info->refCount <= 0) { + if (info->refCount-- <= 1) { ckfree(info); } } @@ -949,7 +949,7 @@ ConsoleEventProc( Tcl_EvalEx(consoleInterp, "tk::ConsoleExit", -1, TCL_EVAL_GLOBAL); } - if (--info->refCount <= 0) { + if (info->refCount-- <= 1) { ckfree(info); } } |