diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-02 09:54:22 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-02 09:54:22 (GMT) |
commit | d4bae5619ab9dd0ffb330fa093af54d97f6a85e9 (patch) | |
tree | 2f7b0a919cbbf235da00b4db9c4de19eb5aed90c /win/tclWinDde.c | |
parent | 8b8d5fc5e84f39fe3d73c7b54b35f43dd2a8b942 (diff) | |
download | tcl-d4bae5619ab9dd0ffb330fa093af54d97f6a85e9.zip tcl-d4bae5619ab9dd0ffb330fa093af54d97f6a85e9.tar.gz tcl-d4bae5619ab9dd0ffb330fa093af54d97f6a85e9.tar.bz2 |
Fix Bug #3545367: DDE test failures
It turns out that "dde poke" had the same bug, unfortunately we cannot make a test-case for that.
Also modified more test-cases to use unicode variable names, so we can more reliably detect this
Diffstat (limited to 'win/tclWinDde.c')
-rw-r--r-- | win/tclWinDde.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/win/tclWinDde.c b/win/tclWinDde.c index da583da..1cd6c46 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -1483,8 +1483,13 @@ DdeObjCmd( break; } case DDE_REQUEST: { - const char *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], +#ifdef UNICODE + const TCHAR *itemString = (TCHAR *) Tcl_GetUnicodeFromObj(objv[firstArg + 2], + &length); +#else + const TCHAR *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length); +#endif if (length == 0) { Tcl_SetObjResult(interp, @@ -1503,7 +1508,7 @@ DdeObjCmd( } else { Tcl_Obj *returnObjPtr; ddeItem = DdeCreateStringHandle(ddeInstance, (void *) itemString, - CP_WINANSI); + CP_WINUNICODE); if (ddeItem != NULL) { ddeData = DdeClientTransaction(NULL, 0, hConv, ddeItem, CF_TEXT, XTYP_REQUEST, 5000, NULL); @@ -1537,8 +1542,13 @@ DdeObjCmd( break; } case DDE_POKE: { - const char *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], +#ifdef UNICODE + const TCHAR *itemString = (TCHAR *) Tcl_GetUnicodeFromObj(objv[firstArg + 2], + &length); +#else + const TCHAR *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length); +#endif BYTE *dataString; if (length == 0) { |