diff options
author | dgp <dgp@users.sourceforge.net> | 2002-02-08 02:57:10 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2002-02-08 02:57:10 (GMT) |
commit | 22946a8cd411fca97059fd12ff2e1b015afc922c (patch) | |
tree | 0dce5cb9458a0fe29fd391898aedfe73a6b1a598 /win | |
parent | c4c221ed212e46e8248635e96a58dc801e106668 (diff) | |
download | tk-22946a8cd411fca97059fd12ff2e1b015afc922c.zip tk-22946a8cd411fca97059fd12ff2e1b015afc922c.tar.gz tk-22946a8cd411fca97059fd12ff2e1b015afc922c.tar.bz2 |
* modified some callers of Tcl routines that
were restored to return (char *) pointing into Tcl_DStrings.
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinDialog.c | 5 | ||||
-rw-r--r-- | win/tkWinTest.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 2b52978..8e0640f 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinDialog.c,v 1.24 2002/01/18 13:29:05 dgp Exp $ + * RCS: @(#) $Id: tkWinDialog.c,v 1.25 2002/02/08 02:57:11 dgp Exp $ * */ @@ -393,9 +393,8 @@ ColorDlgHookProc(hDlg, uMsg, wParam, lParam) ccPtr = (CHOOSECOLOR *) lParam; title = (const char *) ccPtr->lCustData; if ((title != NULL) && (title[0] != '\0')) { - Tcl_WinUtfToTChar(title, -1, &ds); (*tkWinProcs->setWindowText)(hDlg, - (TCHAR *) Tcl_DStringValue(&ds)); + Tcl_WinUtfToTChar(title, -1, &ds)); Tcl_DStringFree(&ds); } if (tsdPtr->debugFlag) { diff --git a/win/tkWinTest.c b/win/tkWinTest.c index bc84e85..ce0259d 100644 --- a/win/tkWinTest.c +++ b/win/tkWinTest.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinTest.c,v 1.5 2001/10/01 21:20:36 hobbs Exp $ + * RCS: @(#) $Id: tkWinTest.c,v 1.6 2002/02/08 02:57:11 dgp Exp $ */ #include "tkWinInt.h" @@ -121,11 +121,10 @@ AppendSystemError( Tcl_Encoding encoding; encoding = Tcl_GetEncoding(NULL, "unicode"); - Tcl_ExternalToUtfDString(encoding, (char *) wMsgPtr, -1, &ds); + msg = Tcl_ExternalToUtfDString(encoding, (char *) wMsgPtr, -1, &ds); Tcl_FreeEncoding(encoding); LocalFree(wMsgPtr); - msg = Tcl_DStringValue(&ds); length = Tcl_DStringLength(&ds); /* |