summaryrefslogtreecommitdiffstats
path: root/win/tclWinReg.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-06-23 21:47:41 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-06-23 21:47:41 (GMT)
commit17d4aee3e5d53fff38c2f5b3320feb6aae327e2b (patch)
tree89cb34aa92980cc3514e7459071c03ff00b4dc10 /win/tclWinReg.c
parent7cd09ac45001b00f1ea4a4e82eee8d78484c7822 (diff)
downloadtcl-17d4aee3e5d53fff38c2f5b3320feb6aae327e2b.zip
tcl-17d4aee3e5d53fff38c2f5b3320feb6aae327e2b.tar.gz
tcl-17d4aee3e5d53fff38c2f5b3320feb6aae327e2b.tar.bz2
Registry extension 1.3.0 -> 1.3.1: SendMessageTimeoutA -> SendMessageTimeout, so make sure only win32 UNICODE API is used.
Diffstat (limited to 'win/tclWinReg.c')
-rw-r--r--win/tclWinReg.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/win/tclWinReg.c b/win/tclWinReg.c
index 327e4a3..4403519 100644
--- a/win/tclWinReg.c
+++ b/win/tclWinReg.c
@@ -172,7 +172,7 @@ Registry_Init(
cmd = Tcl_CreateObjCommand(interp, "registry", RegistryObjCmd,
interp, DeleteCmd);
Tcl_SetAssocData(interp, REGISTRY_ASSOC_KEY, NULL, cmd);
- return Tcl_PkgProvide(interp, "registry", "1.3.0");
+ return Tcl_PkgProvide(interp, "registry", "1.3.1");
}
/*
@@ -415,7 +415,6 @@ DeleteKey(
const TCHAR *nativeTail;
HKEY rootKey, subkey;
DWORD result;
- int length;
Tcl_DString buf;
REGSAM saveMode = mode;
@@ -423,8 +422,8 @@ DeleteKey(
* Find the parent of the key being deleted and open it.
*/
- keyName = Tcl_GetStringFromObj(keyNameObj, &length);
- buffer = ckalloc(length + 1);
+ keyName = Tcl_GetString(keyNameObj);
+ buffer = ckalloc(keyNameObj->length + 1);
strcpy(buffer, keyName);
if (ParseKeyName(interp, buffer, &hostName, &rootKey,
@@ -1408,7 +1407,7 @@ BroadcastValue(
}
}
- str = Tcl_GetStringFromObj(objv[0], &len);
+ str = (char*)Tcl_GetUnicodeFromObj(objv[0], &len);
if (len == 0) {
str = NULL;
}
@@ -1417,7 +1416,7 @@ BroadcastValue(
* Use the ignore the result.
*/
- result = SendMessageTimeoutA(HWND_BROADCAST, WM_SETTINGCHANGE,
+ result = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE,
(WPARAM) 0, (LPARAM) str, SMTO_ABORTIFHUNG, timeout, &sendResult);
objPtr = Tcl_NewObj();