summaryrefslogtreecommitdiffstats
path: root/win/tclWinDde.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-08-06 07:40:47 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-08-06 07:40:47 (GMT)
commit22298666ade7c7396ece86e2976309e955e9abd5 (patch)
treed9af3e73a3058e77a5fcd08ed1b848553da8e23d /win/tclWinDde.c
parentaa7ab9ce5eba66a61032dc91795617354ca8c05f (diff)
parent6b4abc4554709c11344edd658305f417fa9c4929 (diff)
downloadtcl-22298666ade7c7396ece86e2976309e955e9abd5.zip
tcl-22298666ade7c7396ece86e2976309e955e9abd5.tar.gz
tcl-22298666ade7c7396ece86e2976309e955e9abd5.tar.bz2
Reference to correct Bug #number.
Fix warning in winDde.c, and more test-cases using Unicode characters
Diffstat (limited to 'win/tclWinDde.c')
-rw-r--r--win/tclWinDde.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/win/tclWinDde.c b/win/tclWinDde.c
index e225989..7b9fbf4 100644
--- a/win/tclWinDde.c
+++ b/win/tclWinDde.c
@@ -948,8 +948,12 @@ MakeDdeConnection(
if (ddeConv == (HCONV) NULL) {
if (interp != NULL) {
+ Tcl_DString dString;
+
+ Tcl_WinTCharToUtf(name, -1, &dString);
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "no registered server named \"%s\"", name));
+ "no registered server named \"%s\"", Tcl_DStringValue(&dString)));
+ Tcl_DStringFree(&dString);
Tcl_SetErrorCode(interp, "TCL", "DDE", "NO_SERVER", NULL);
}
return TCL_ERROR;
@@ -1425,7 +1429,11 @@ DdeObjCmd(
serviceName = DdeSetServerName(interp, serviceName, flags,
handlerPtr);
if (serviceName != NULL) {
+#ifdef UNICODE
Tcl_SetObjResult(interp, Tcl_NewUnicodeObj((Tcl_UniChar *) serviceName, -1));
+#else
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(serviceName, -1));
+#endif
} else {
Tcl_ResetResult(interp);
}