diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-06 07:59:01 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-06 07:59:01 (GMT) |
commit | a59b6e0bf7d4ce8ce4bf1d5b5f994bc0adc60912 (patch) | |
tree | 9726218d2767be111aba0feda74cd0ac220f4355 /win/tclWinDde.c | |
parent | 47b9d4a19f065a528e365e8cf8ca5ae6bd5a8cb4 (diff) | |
parent | ecec90b4aafbce89f57c1d810d440efc7df296ad (diff) | |
download | tcl-a59b6e0bf7d4ce8ce4bf1d5b5f994bc0adc60912.zip tcl-a59b6e0bf7d4ce8ce4bf1d5b5f994bc0adc60912.tar.gz tcl-a59b6e0bf7d4ce8ce4bf1d5b5f994bc0adc60912.tar.bz2 |
merge trunk
Diffstat (limited to 'win/tclWinDde.c')
-rw-r--r-- | win/tclWinDde.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/win/tclWinDde.c b/win/tclWinDde.c index b3c8326..94c008d 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -157,7 +157,8 @@ Dde_Init( #ifdef UNICODE if (TclWinGetPlatformId() < VER_PLATFORM_WIN32_NT) { - Tcl_AppendResult(interp, "Win32s and Windows 9x are not supported platforms", NULL); + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "Win32s and Windows 9x are not supported platforms", -1)); return TCL_ERROR; } #endif @@ -947,8 +948,12 @@ MakeDdeConnection( if (ddeConv == (HCONV) NULL) { if (interp != NULL) { - Tcl_AppendResult(interp, "no registered server named \"", - name, "\"", NULL); + Tcl_DString dString; + + Tcl_WinTCharToUtf(name, -1, &dString); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "no registered server named \"%s\"", Tcl_DStringValue(&dString))); + Tcl_DStringFree(&dString); Tcl_SetErrorCode(interp, "TCL", "DDE", "NO_SERVER", NULL); } return TCL_ERROR; @@ -1424,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); } @@ -1649,9 +1658,9 @@ DdeObjCmd( */ if (Tcl_IsSafe(riPtr->interp) && riPtr->handlerPtr == NULL) { - Tcl_SetResult(riPtr->interp, "permission denied: " - "a handler procedure must be defined for use in " - "a safe interp", TCL_STATIC); + Tcl_SetObjResult(riPtr->interp, Tcl_NewStringObj( + "permission denied: a handler procedure must be" + " defined for use in a safe interp", -1)); Tcl_SetErrorCode(interp, "TCL", "DDE", "SECURITY_CHECK", NULL); result = TCL_ERROR; |