diff options
| -rw-r--r-- | generic/tclEncoding.c | 48 | ||||
| -rw-r--r-- | generic/tclInt.decls | 6 | ||||
| -rw-r--r-- | generic/tclIntDecls.h | 16 | ||||
| -rw-r--r-- | generic/tclStubInit.c | 4 | ||||
| -rw-r--r-- | generic/tclTest.c | 72 | ||||
| -rw-r--r-- | tests/encoding.test | 13 | ||||
| -rw-r--r-- | tests/unixInit.test | 3 |
7 files changed, 14 insertions, 148 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index ed505f7..45c08da 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -413,52 +413,6 @@ Tcl_SetEncodingSearchPath( } /* - *---------------------------------------------------------------------- - * - * TclGetLibraryPath -- - * - * Keeps the per-thread copy of the library path current with changes to - * the global copy. - * - * Results: - * Returns a "list" (Tcl_Obj *) that contains the library path. - * - *---------------------------------------------------------------------- - */ - -Tcl_Obj * -TclGetLibraryPath(void) -{ - return TclGetProcessGlobalValue(&libraryPath); -} - -/* - *---------------------------------------------------------------------- - * - * TclSetLibraryPath -- - * - * Keeps the per-thread copy of the library path current with changes to - * the global copy. - * - * Since the result of this routine is void, if searchPath is not a valid - * list this routine silently does nothing. - * - *---------------------------------------------------------------------- - */ - -void -TclSetLibraryPath( - Tcl_Obj *path) -{ - Tcl_Size dummy; - - if (TCL_ERROR == TclListObjLengthM(NULL, path, &dummy)) { - return; - } - TclSetProcessGlobalValue(&libraryPath, path, NULL); -} - -/* *--------------------------------------------------------------------------- * * FillEncodingFileMap -- @@ -4327,7 +4281,7 @@ InitializeEncodingSearchPath( TclNewObj(searchPathObj); Tcl_IncrRefCount(encodingObj); Tcl_IncrRefCount(searchPathObj); - libPathObj = TclGetLibraryPath(); + libPathObj = TclGetProcessGlobalValue(&libraryPath); Tcl_IncrRefCount(libPathObj); TclListObjLengthM(NULL, libPathObj, &numDirs); diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 7c8ea15..2ebb1be 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -381,12 +381,6 @@ declare 151 { void TclRegExpRangeUniChar(Tcl_RegExp re, Tcl_Size index, Tcl_Size *startPtr, Tcl_Size *endPtr) } -declare 152 { - void TclSetLibraryPath(Tcl_Obj *pathPtr) -} -declare 153 { - Tcl_Obj *TclGetLibraryPath(void) -} declare 156 { void TclRegError(Tcl_Interp *interp, const char *msg, int status) diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 40b02d6..f22b2d5 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -320,10 +320,8 @@ EXTERN int TclRegAbout(Tcl_Interp *interp, Tcl_RegExp re); /* 151 */ EXTERN void TclRegExpRangeUniChar(Tcl_RegExp re, Tcl_Size index, Tcl_Size *startPtr, Tcl_Size *endPtr); -/* 152 */ -EXTERN void TclSetLibraryPath(Tcl_Obj *pathPtr); -/* 153 */ -EXTERN Tcl_Obj * TclGetLibraryPath(void); +/* Slot 152 is reserved */ +/* Slot 153 is reserved */ /* Slot 154 is reserved */ /* Slot 155 is reserved */ /* 156 */ @@ -734,8 +732,8 @@ typedef struct TclIntStubs { void (*tclHandleRelease) (TclHandle handle); /* 149 */ int (*tclRegAbout) (Tcl_Interp *interp, Tcl_RegExp re); /* 150 */ void (*tclRegExpRangeUniChar) (Tcl_RegExp re, Tcl_Size index, Tcl_Size *startPtr, Tcl_Size *endPtr); /* 151 */ - void (*tclSetLibraryPath) (Tcl_Obj *pathPtr); /* 152 */ - Tcl_Obj * (*tclGetLibraryPath) (void); /* 153 */ + void (*reserved152)(void); + void (*reserved153)(void); void (*reserved154)(void); void (*reserved155)(void); void (*tclRegError) (Tcl_Interp *interp, const char *msg, int status); /* 156 */ @@ -1080,10 +1078,8 @@ extern const TclIntStubs *tclIntStubsPtr; (tclIntStubsPtr->tclRegAbout) /* 150 */ #define TclRegExpRangeUniChar \ (tclIntStubsPtr->tclRegExpRangeUniChar) /* 151 */ -#define TclSetLibraryPath \ - (tclIntStubsPtr->tclSetLibraryPath) /* 152 */ -#define TclGetLibraryPath \ - (tclIntStubsPtr->tclGetLibraryPath) /* 153 */ +/* Slot 152 is reserved */ +/* Slot 153 is reserved */ /* Slot 154 is reserved */ /* Slot 155 is reserved */ #define TclRegError \ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 1e734dc..fd2bfe6 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -551,8 +551,8 @@ static const TclIntStubs tclIntStubs = { TclHandleRelease, /* 149 */ TclRegAbout, /* 150 */ TclRegExpRangeUniChar, /* 151 */ - TclSetLibraryPath, /* 152 */ - TclGetLibraryPath, /* 153 */ + 0, /* 152 */ + 0, /* 153 */ 0, /* 154 */ 0, /* 155 */ TclRegError, /* 156 */ diff --git a/generic/tclTest.c b/generic/tclTest.c index 5ada7ad..968556b 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -292,8 +292,6 @@ static Tcl_ObjCmdProc TestFilesystemObjCmd; static Tcl_ObjCmdProc TestSimpleFilesystemObjCmd; static void TestReport(const char *cmd, Tcl_Obj *arg1, Tcl_Obj *arg2); -static Tcl_ObjCmdProc TestgetencpathObjCmd; -static Tcl_ObjCmdProc TestsetencpathObjCmd; static Tcl_Obj * TestReportGetNativePath(Tcl_Obj *pathPtr); static Tcl_FSStatProc TestReportStat; static Tcl_FSAccessProc TestReportAccess; @@ -721,10 +719,6 @@ Tcltest_Init( NULL, NULL); Tcl_CreateObjCommand(interp, "testinterpresolver", TestInterpResolverCmd, NULL, NULL); - Tcl_CreateObjCommand(interp, "testgetencpath", TestgetencpathObjCmd, - NULL, NULL); - Tcl_CreateObjCommand(interp, "testsetencpath", TestsetencpathObjCmd, - NULL, NULL); Tcl_CreateObjCommand(interp, "testapplylambda", TestApplyLambdaObjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testlutil", TestLutilCmd, @@ -8272,72 +8266,6 @@ TestconcatobjCmd( /* *---------------------------------------------------------------------- * - * TestgetencpathObjCmd -- - * - * This function implements the "testgetencpath" command. It is used to - * test Tcl_GetEncodingSearchPath(). - * - * Results: - * A standard Tcl result. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static int -TestgetencpathObjCmd( - TCL_UNUSED(void *), - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const *objv) /* Argument strings. */ -{ - if (objc != 1) { - Tcl_WrongNumArgs(interp, 1, objv, ""); - return TCL_ERROR; - } - - Tcl_SetObjResult(interp, Tcl_GetEncodingSearchPath()); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * TestsetencpathCmd -- - * - * This function implements the "testsetencpath" command. It is used to - * test Tcl_SetDefaultEncodingDir(). - * - * Results: - * A standard Tcl result. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static int -TestsetencpathObjCmd( - TCL_UNUSED(void *), - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const *objv) /* Argument strings. */ -{ - if (objc != 2) { - Tcl_WrongNumArgs(interp, 1, objv, "defaultDir"); - return TCL_ERROR; - } - - Tcl_SetEncodingSearchPath(objv[1]); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * * TestparseargsCmd -- * * This procedure implements the "testparseargs" command. It is used to diff --git a/tests/encoding.test b/tests/encoding.test index e863ce6..8bc096c 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -39,7 +39,6 @@ testConstraint testencoding [llength [info commands testencoding]] testConstraint testbytestring [llength [info commands testbytestring]] testConstraint teststringbytes [llength [info commands teststringbytes]] testConstraint exec [llength [info commands exec]] -testConstraint testgetencpath [llength [info commands testgetencpath]] # TclInitEncodingSubsystem is tested by the rest of this file # TclFinalizeEncodingSubsystem is not currently tested @@ -1029,15 +1028,13 @@ foreach from {cp932 shiftjis euc-jp iso2022-jp} { } } -test encoding-26.0 {Tcl_GetEncodingSearchPath} -constraints { - testgetencpath -} -setup { - set origPath [testgetencpath] - testsetencpath slappy +test encoding-26.0 {Tcl_GetEncodingSearchPath} -setup { + set origPath [encoding dirs] + encoding dirs slappy } -body { - testgetencpath + encoding dirs } -cleanup { - testsetencpath $origPath + encoding dirs $origPath } -result slappy file delete {*}[glob -directory [temporaryDirectory] *.chars *.tcltestout] diff --git a/tests/unixInit.test b/tests/unixInit.test index 3a9fa6d..3bbe1e9 100644 --- a/tests/unixInit.test +++ b/tests/unixInit.test @@ -17,9 +17,6 @@ if {"::tcltest" ni [namespace children]} { unset -nocomplain path catch {set oldlang $env(LANG)} set env(LANG) C - -# Some tests require the testgetencpath command -testConstraint testgetencpath [llength [info commands testgetencpath]] test unixInit-1.1 {TclpInitPlatform: ignore SIGPIPE} {unix stdio} { set x {} |
