diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-06-23 22:22:39 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-06-23 22:22:39 (GMT) |
commit | dd86878ece9accdecdd6aa124e08b2a255da55b7 (patch) | |
tree | 76094fc43d096a758df3a6d5fb14e102ab3d80b5 | |
parent | 99ec0939cf2a6ead9546a36c42a3224eaf050f59 (diff) | |
parent | 17d4aee3e5d53fff38c2f5b3320feb6aae327e2b (diff) | |
download | tcl-dd86878ece9accdecdd6aa124e08b2a255da55b7.zip tcl-dd86878ece9accdecdd6aa124e08b2a255da55b7.tar.gz tcl-dd86878ece9accdecdd6aa124e08b2a255da55b7.tar.bz2 |
merge trunk
-rw-r--r-- | generic/tclScan.c | 4 | ||||
-rw-r--r-- | generic/tclTest.c | 4 | ||||
-rw-r--r-- | generic/tclTestProcBodyObj.c | 2 | ||||
-rwxr-xr-x | library/reg/pkgIndex.tcl | 4 | ||||
-rw-r--r-- | tests/registry.test | 4 | ||||
-rw-r--r-- | win/Makefile.in | 4 | ||||
-rw-r--r-- | win/makefile.vc | 4 | ||||
-rw-r--r-- | win/tclWinConsole.c | 2 | ||||
-rw-r--r-- | win/tclWinPipe.c | 2 | ||||
-rw-r--r-- | win/tclWinReg.c | 29 |
10 files changed, 29 insertions, 30 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c index ec54ddb..51628b9 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -595,7 +595,7 @@ Tcl_ScanObjCmd( return TCL_ERROR; } - format = Tcl_GetStringFromObj(objv[2], NULL); + format = Tcl_GetString(objv[2]); numVars = objc-3; /* @@ -617,7 +617,7 @@ Tcl_ScanObjCmd( } } - string = Tcl_GetStringFromObj(objv[1], NULL); + string = Tcl_GetString(objv[1]); baseString = string; /* diff --git a/generic/tclTest.c b/generic/tclTest.c index fc86b7b..98beae8 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -2268,9 +2268,9 @@ TesteventDeleteProc( return 0; } targetName = (Tcl_Obj *) clientData; - targetNameStr = (char *) Tcl_GetStringFromObj(targetName, NULL); + targetNameStr = (char *) Tcl_GetString(targetName); ev = (TestEvent *) event; - evNameStr = Tcl_GetStringFromObj(ev->tag, NULL); + evNameStr = Tcl_GetString(ev->tag); if (strcmp(evNameStr, targetNameStr) == 0) { Tcl_DecrRefCount(ev->tag); Tcl_DecrRefCount(ev->command); diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index be510fc..c098489 100644 --- a/generic/tclTestProcBodyObj.c +++ b/generic/tclTestProcBodyObj.c @@ -245,7 +245,7 @@ ProcBodyTestProcObjCmd( * Find the Command pointer to this procedure */ - fullName = Tcl_GetStringFromObj(objv[3], NULL); + fullName = Tcl_GetString(objv[3]); procCmd = Tcl_FindCommand(interp, fullName, NULL, TCL_LEAVE_ERR_MSG); if (procCmd == NULL) { return TCL_ERROR; diff --git a/library/reg/pkgIndex.tcl b/library/reg/pkgIndex.tcl index 55af4b3..49fd1ac 100755 --- a/library/reg/pkgIndex.tcl +++ b/library/reg/pkgIndex.tcl @@ -1,9 +1,9 @@ if {([info commands ::tcl::pkgconfig] eq "") || ([info sharedlibextension] ne ".dll")} return if {[::tcl::pkgconfig get debug]} { - package ifneeded registry 1.3.0 \ + package ifneeded registry 1.3.1 \ [list load [file join $dir tclreg13g.dll] registry] } else { - package ifneeded registry 1.3.0 \ + package ifneeded registry 1.3.1 \ [list load [file join $dir tclreg13.dll] registry] } diff --git a/tests/registry.test b/tests/registry.test index 77588e3..0f78212 100644 --- a/tests/registry.test +++ b/tests/registry.test @@ -19,7 +19,7 @@ testConstraint reg 0 if {[testConstraint win]} { if {![catch { ::tcltest::loadTestedCommands - set ::regver [package require registry 1.3.0] + set ::regver [package require registry 1.3.1] }]} { testConstraint reg 1 } @@ -33,7 +33,7 @@ testConstraint english [expr { test registry-1.0 {check if we are testing the right dll} {win reg} { set ::regver -} {1.3.0} +} {1.3.1} test registry-1.1 {argument parsing for registry command} {win reg} { list [catch {registry} msg] $msg } {1 {wrong # args: should be "registry ?-32bit|-64bit? option ?arg ...?"}} diff --git a/win/Makefile.in b/win/Makefile.in index bd77bda..c9c4588 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -701,14 +701,14 @@ test-tcl: binaries $(TCLSH) $(CAT32) $(TEST_DLL_FILE) ./$(TCLSH) "$(ROOT_DIR_NATIVE)/tests/all.tcl" $(TESTFLAGS) \ -load "package ifneeded Tcltest ${VERSION}@TCL_PATCH_LEVEL@ [list load [file normalize ${TEST_DLL_FILE}] Tcltest]; \ package ifneeded dde 1.4.0 [list load [file normalize ${DDE_DLL_FILE}] dde]; \ - package ifneeded registry 1.3.0 [list load [file normalize ${REG_DLL_FILE}] registry]" | ./$(CAT32) + package ifneeded registry 1.3.1 [list load [file normalize ${REG_DLL_FILE}] registry]" | ./$(CAT32) # Useful target to launch a built tclsh with the proper path,... runtest: binaries $(TCLSH) $(TEST_DLL_FILE) @TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \ ./$(TCLSH) $(TESTFLAGS) -load "package ifneeded Tcltest ${VERSION}@TCL_PATCH_LEVEL@ [list load [file normalize ${TEST_DLL_FILE}] Tcltest]; \ package ifneeded dde 1.4.0 [list load [file normalize ${DDE_DLL_FILE}] dde]; \ - package ifneeded registry 1.3.0 [list load [file normalize ${REG_DLL_FILE}] registry]" $(SCRIPT) + package ifneeded registry 1.3.1 [list load [file normalize ${REG_DLL_FILE}] registry]" $(SCRIPT) # This target can be used to run tclsh from the build directory via # `make shell SCRIPT=foo.tcl` diff --git a/win/makefile.vc b/win/makefile.vc index 7fc0f9e..fa66751 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -581,13 +581,13 @@ test-core: setup $(TCLTEST) dlls $(CAT32) !if "$(OS)" == "Windows_NT" || "$(MSVCDIR)" == "IDE" $(DEBUGGER) $(TCLTEST) "$(ROOT:\=/)/tests/all.tcl" $(TESTFLAGS) -loadfile << package ifneeded dde 1.4.0 [list load "$(TCLDDELIB:\=/)" dde] - package ifneeded registry 1.3.0 [list load "$(TCLREGLIB:\=/)" registry] + package ifneeded registry 1.3.1 [list load "$(TCLREGLIB:\=/)" registry] << !else @echo Please wait while the tests are collected... $(TCLTEST) "$(ROOT:\=/)/tests/all.tcl" $(TESTFLAGS) -loadfile << > tests.log package ifneeded dde 1.4.0 "$(TCLDDELIB:\=/)" dde] - package ifneeded registry 1.3.0 "$(TCLREGLIB:\=/)" registry] + package ifneeded registry 1.3.1 "$(TCLREGLIB:\=/)" registry] << type tests.log | more !endif diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index 77e3d9f..ede127e 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -225,7 +225,7 @@ ReadConsoleBytes( * success with ntchars == 0 and GetLastError() will be * ERROR_OPERATION_ABORTED. We do not want to treat this case * as EOF so we will loop around again. If no Ctrl signal handlers - * have been established, the default signal OS handler in a separate + * have been established, the default signal OS handler in a separate * thread will terminate the program. If a Ctrl signal handler * has been established (through an extension for example), it * will run and take whatever action it deems appropriate. diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 33493ae..ec6085a 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -2653,7 +2653,7 @@ Tcl_PidObjCmd( if (objc == 1) { Tcl_SetObjResult(interp, Tcl_NewWideIntObj((unsigned) getpid())); } else { - chan = Tcl_GetChannel(interp, Tcl_GetStringFromObj(objv[1], NULL), + chan = Tcl_GetChannel(interp, Tcl_GetString(objv[1]), NULL); if (chan == (Tcl_Channel) NULL) { return TCL_ERROR; diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 372096e..16ac7f4 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -163,7 +163,7 @@ Registry_Init( cmd = Tcl_CreateObjCommand(interp, "registry", RegistryObjCmd, interp, DeleteCmd); Tcl_SetAssocData(interp, REGISTRY_ASSOC_KEY, NULL, cmd); - return Tcl_PkgProvideEx(interp, "registry", "1.3.0", NULL); + return Tcl_PkgProvideEx(interp, "registry", "1.3.1", NULL); } /* @@ -281,7 +281,7 @@ RegistryObjCmd( return TCL_ERROR; } - if (Tcl_GetStringFromObj(objv[n], NULL)[0] == '-') { + if (Tcl_GetString(objv[n])[0] == '-') { if (Tcl_GetIndexFromObjStruct(interp, objv[n++], modes, sizeof(char *), "mode", 0, &index) != TCL_OK) { return TCL_ERROR; @@ -406,7 +406,6 @@ DeleteKey( const TCHAR *nativeTail; HKEY rootKey, subkey; DWORD result; - int length; Tcl_DString buf; REGSAM saveMode = mode; @@ -414,8 +413,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, @@ -520,8 +519,8 @@ DeleteValue( if (result != ERROR_SUCCESS) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unable to delete value \"%s\" from key \"%s\": ", - Tcl_GetStringFromObj(valueNameObj, NULL), - Tcl_GetStringFromObj(keyNameObj, NULL))); + Tcl_GetString(valueNameObj), + Tcl_GetString(keyNameObj))); AppendSystemError(interp, result); result = TCL_ERROR; } else { @@ -569,7 +568,7 @@ GetKeyNames( Tcl_DString ds; /* Buffer to translate subkey name to UTF-8 */ if (patternObj) { - pattern = Tcl_GetStringFromObj(patternObj, NULL); + pattern = Tcl_GetString(patternObj); } else { pattern = NULL; } @@ -598,7 +597,7 @@ GetKeyNames( } else { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unable to enumerate subkeys of \"%s\": ", - Tcl_GetStringFromObj(keyNameObj, NULL))); + Tcl_GetString(keyNameObj))); AppendSystemError(interp, result); result = TCL_ERROR; } @@ -681,8 +680,8 @@ GetType( if (result != ERROR_SUCCESS) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unable to get type of value \"%s\" from key \"%s\": ", - Tcl_GetStringFromObj(valueNameObj, NULL), - Tcl_GetStringFromObj(keyNameObj, NULL))); + Tcl_GetString(valueNameObj), + Tcl_GetString(keyNameObj))); AppendSystemError(interp, result); return TCL_ERROR; } @@ -776,8 +775,8 @@ GetValue( if (result != ERROR_SUCCESS) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unable to get value \"%s\" from key \"%s\": ", - Tcl_GetStringFromObj(valueNameObj, NULL), - Tcl_GetStringFromObj(keyNameObj, NULL))); + Tcl_GetString(valueNameObj), + Tcl_GetString(keyNameObj))); AppendSystemError(interp, result); Tcl_DStringFree(&data); return TCL_ERROR; @@ -881,7 +880,7 @@ GetValueNames( result = TCL_OK; if (patternObj) { - pattern = Tcl_GetStringFromObj(patternObj, NULL); + pattern = Tcl_GetString(patternObj); } else { pattern = NULL; } @@ -1402,7 +1401,7 @@ BroadcastValue( } } - str = Tcl_GetStringFromObj(objv[0], &len); + str = (char*)Tcl_GetUnicodeFromObj(objv[0], &len); if (len == 0) { str = NULL; } |