summaryrefslogtreecommitdiffstats
path: root/win/tkWinSend.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-01-11 15:35:39 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-01-11 15:35:39 (GMT)
commita7b45de808c4bca805fab7b4eb90aa6e6f09e2ac (patch)
tree9afda096b9165b4f20fb70975876d2bf0c1c2c29 /win/tkWinSend.c
parenta46a8df372318c40d2d0c346578eef7412a7b257 (diff)
downloadtk-a7b45de808c4bca805fab7b4eb90aa6e6f09e2ac.zip
tk-a7b45de808c4bca805fab7b4eb90aa6e6f09e2ac.tar.gz
tk-a7b45de808c4bca805fab7b4eb90aa6e6f09e2ac.tar.bz2
Many minute fixes to reduce number of minor warnings from GCC.
Diffstat (limited to 'win/tkWinSend.c')
-rw-r--r--win/tkWinSend.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/win/tkWinSend.c b/win/tkWinSend.c
index 2269512..3a064be 100644
--- a/win/tkWinSend.c
+++ b/win/tkWinSend.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinSend.c,v 1.11 2005/12/02 00:19:04 dkf Exp $
+ * RCS: @(#) $Id: tkWinSend.c,v 1.12 2007/01/11 15:35:41 dkf Exp $
*/
#include "tkWinSendCom.h"
@@ -51,10 +51,12 @@ typedef struct SendEvent {
Tcl_Obj *cmdPtr;
} SendEvent;
+#ifdef TK_SEND_ENABLED_ON_WINDOWS
typedef struct {
int initialized;
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
+#endif
/*
* Functions internal to this file.
@@ -116,14 +118,6 @@ Tk_SetAppName(
* interpreter in later "send" commands. Must
* be globally unique. */
{
- ThreadSpecificData *tsdPtr = NULL;
- TkWindow *winPtr = (TkWindow *)tkwin;
- RegisteredInterp *riPtr = NULL;
- Tcl_Interp *interp;
- HRESULT hr = S_OK;
-
- interp = winPtr->mainPtr->interp;
-
#ifndef TK_SEND_ENABLED_ON_WINDOWS
/*
* Temporarily disabled for bug #858822
@@ -132,6 +126,14 @@ Tk_SetAppName(
return name;
#else /* TK_SEND_ENABLED_ON_WINDOWS */
+ ThreadSpecificData *tsdPtr = NULL;
+ TkWindow *winPtr = (TkWindow *)tkwin;
+ RegisteredInterp *riPtr = NULL;
+ Tcl_Interp *interp;
+ HRESULT hr = S_OK;
+
+ interp = winPtr->mainPtr->interp;
+
tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
@@ -207,12 +209,6 @@ TkGetInterpNames(
Tk_Window tkwin) /* Window whose display is to be used for the
* lookup. */
{
- LPRUNNINGOBJECTTABLE pROT = NULL;
- LPCOLESTR oleszStub = TKWINSEND_REGISTRATION_BASE;
- HRESULT hr = S_OK;
- Tcl_Obj *objList = NULL;
- int result = TCL_OK;
-
#ifndef TK_SEND_ENABLED_ON_WINDOWS
/*
* Temporarily disabled for bug #858822
@@ -221,6 +217,12 @@ TkGetInterpNames(
return TCL_OK;
#else /* TK_SEND_ENABLED_ON_WINDOWS */
+ LPRUNNINGOBJECTTABLE pROT = NULL;
+ LPCOLESTR oleszStub = TKWINSEND_REGISTRATION_BASE;
+ HRESULT hr = S_OK;
+ Tcl_Obj *objList = NULL;
+ int result = TCL_OK;
+
hr = GetRunningObjectTable(0, &pROT);
if (SUCCEEDED(hr)) {
IBindCtx* pBindCtx = NULL;