summaryrefslogtreecommitdiffstats
path: root/win/tkWinSendCom.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinSendCom.c')
-rw-r--r--win/tkWinSendCom.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/win/tkWinSendCom.c b/win/tkWinSendCom.c
index 59e2b69..c67e533 100644
--- a/win/tkWinSendCom.c
+++ b/win/tkWinSendCom.c
@@ -372,15 +372,14 @@ Async(
UINT *puArgErr)
{
HRESULT hr = S_OK;
- int result = TCL_OK;
VARIANT vCmd;
VariantInit(&vCmd);
hr = VariantChangeType(&vCmd, &Cmd, 0, VT_BSTR);
if (FAILED(hr)) {
- Tcl_SetStringObj(Tcl_GetObjResult(obj->interp),
- "invalid args: Async(command)", -1);
+ Tcl_SetObjResult(obj->interp, Tcl_NewStringObj(
+ "invalid args: Async(command)", -1));
SetExcepInfo(obj->interp, pExcepInfo);
hr = DISP_E_EXCEPTION;
}
@@ -388,13 +387,13 @@ Async(
if (SUCCEEDED(hr)) {
if (obj->interp) {
Tcl_Obj *scriptPtr = Tcl_NewUnicodeObj(vCmd.bstrVal,
- (int)SysStringLen(vCmd.bstrVal));
- result = TkWinSend_QueueCommand(obj->interp, scriptPtr);
+ (int) SysStringLen(vCmd.bstrVal));
+
+ TkWinSend_QueueCommand(obj->interp, scriptPtr);
}
}
VariantClear(&vCmd);
-
return hr;
}