diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-10-05 18:22:21 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-10-05 18:22:21 (GMT) |
commit | 501d0b1523e4a2b370c58cd262bbed99725a5ab1 (patch) | |
tree | 57b5f8cd5ff8ef866da62495bc435946f4655c50 /win/tkWinSendCom.c | |
parent | 291d618cfb6ad5e935244599abbf1bdb93a284fc (diff) | |
download | tk-501d0b1523e4a2b370c58cd262bbed99725a5ab1.zip tk-501d0b1523e4a2b370c58cd262bbed99725a5ab1.tar.gz tk-501d0b1523e4a2b370c58cd262bbed99725a5ab1.tar.bz2 |
Greatly clean up Tk's handling of the writability of the Tcl result object.
Diffstat (limited to 'win/tkWinSendCom.c')
-rw-r--r-- | win/tkWinSendCom.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/win/tkWinSendCom.c b/win/tkWinSendCom.c index b71b63a..f07259e 100644 --- a/win/tkWinSendCom.c +++ b/win/tkWinSendCom.c @@ -18,7 +18,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinSendCom.c,v 1.8 2007/12/13 15:28:56 dgp Exp $ + * RCS: @(#) $Id: tkWinSendCom.c,v 1.9 2008/10/05 18:22:22 dkf Exp $ */ #include "tkInt.h" @@ -381,8 +381,8 @@ Async( 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; } @@ -390,13 +390,13 @@ Async( if (SUCCEEDED(hr)) { if (obj->interp) { Tcl_Obj *scriptPtr = Tcl_NewUnicodeObj(vCmd.bstrVal, - (int)SysStringLen(vCmd.bstrVal)); + (int) SysStringLen(vCmd.bstrVal)); + result = TkWinSend_QueueCommand(obj->interp, scriptPtr); } } VariantClear(&vCmd); - return hr; } |