diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.decls | 8 | ||||
-rw-r--r-- | generic/tclCmdAH.c | 4 | ||||
-rw-r--r-- | generic/tclDecls.h | 14 | ||||
-rw-r--r-- | generic/tclFileName.c | 8 | ||||
-rw-r--r-- | generic/tclInt.h | 1 | ||||
-rw-r--r-- | generic/tclMain.c | 2 | ||||
-rw-r--r-- | generic/tclPathObj.c | 6 | ||||
-rw-r--r-- | generic/tclRegexp.c | 2 | ||||
-rw-r--r-- | generic/tclStubInit.c | 4 | ||||
-rw-r--r-- | generic/tclTest.c | 9 | ||||
-rw-r--r-- | generic/tclUtil.c | 6 | ||||
-rw-r--r-- | generic/tclZlib.c | 4 |
12 files changed, 45 insertions, 23 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls index 3f4103f..59d0ece 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -2566,10 +2566,10 @@ declare 683 { # Tcl_WideUInt *uwidePtr) #} -# TIP 651 (reserved) -#declare 687 { -# Tcl_Obj *Tcl_DStringToObj(Tcl_DString *dsPtr) -#} +# TIP 651 +declare 687 { + Tcl_Obj *Tcl_DStringToObj(Tcl_DString *dsPtr) +} # ----- BASELINE -- FOR -- 8.7.0 / 9.0.0 ----- # diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 1e9832a..9905633 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -654,7 +654,7 @@ EncodingConvertfromObjCmd( * truncate the string at the first null byte. */ - Tcl_SetObjResult(interp, TclDStringToObj(&ds)); + Tcl_SetObjResult(interp, Tcl_DStringToObj(&ds)); /* * We're done with the encoding @@ -2060,7 +2060,7 @@ PathNativeNameCmd( if (Tcl_TranslateFileName(interp, TclGetString(objv[1]), &ds) == NULL) { return TCL_ERROR; } - Tcl_SetObjResult(interp, TclDStringToObj(&ds)); + Tcl_SetObjResult(interp, Tcl_DStringToObj(&ds)); return TCL_OK; } diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 0888ecf..3a57b2f 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -2040,6 +2040,11 @@ EXTERN int Tcl_RemoveChannelMode(Tcl_Interp *interp, Tcl_Channel chan, int mode); /* 683 */ EXTERN int Tcl_GetEncodingNulLength(Tcl_Encoding encoding); +/* Slot 684 is reserved */ +/* Slot 685 is reserved */ +/* Slot 686 is reserved */ +/* 687 */ +EXTERN Tcl_Obj * Tcl_DStringToObj(Tcl_DString *dsPtr); typedef struct { const struct TclPlatStubs *tclPlatStubs; @@ -2759,6 +2764,10 @@ typedef struct TclStubs { int (*tcl_GetNumber) (Tcl_Interp *interp, const char *bytes, size_t numBytes, void **clientDataPtr, int *typePtr); /* 681 */ int (*tcl_RemoveChannelMode) (Tcl_Interp *interp, Tcl_Channel chan, int mode); /* 682 */ int (*tcl_GetEncodingNulLength) (Tcl_Encoding encoding); /* 683 */ + void (*reserved684)(void); + void (*reserved685)(void); + void (*reserved686)(void); + Tcl_Obj * (*tcl_DStringToObj) (Tcl_DString *dsPtr); /* 687 */ } TclStubs; extern const TclStubs *tclStubsPtr; @@ -4157,6 +4166,11 @@ extern const TclStubs *tclStubsPtr; (tclStubsPtr->tcl_RemoveChannelMode) /* 682 */ #define Tcl_GetEncodingNulLength \ (tclStubsPtr->tcl_GetEncodingNulLength) /* 683 */ +/* Slot 684 is reserved */ +/* Slot 685 is reserved */ +/* Slot 686 is reserved */ +#define Tcl_DStringToObj \ + (tclStubsPtr->tcl_DStringToObj) /* 687 */ #endif /* defined(USE_TCL_STUBS) */ diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 3cdd52f..3ca1ab5 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -454,7 +454,7 @@ TclpGetNativePathType( if ((rootEnd != path) && (driveNameLengthPtr != NULL)) { *driveNameLengthPtr = rootEnd - path; if (driveNameRef != NULL) { - *driveNameRef = TclDStringToObj(&ds); + *driveNameRef = Tcl_DStringToObj(&ds); Tcl_IncrRefCount(*driveNameRef); } } @@ -734,7 +734,7 @@ SplitWinPath( */ if (p != path) { - Tcl_ListObjAppendElement(NULL, result, TclDStringToObj(&buf)); + Tcl_ListObjAppendElement(NULL, result, Tcl_DStringToObj(&buf)); } Tcl_DStringFree(&buf); @@ -1767,7 +1767,7 @@ TclGlob( if (head != Tcl_DStringValue(&buffer)) { Tcl_DStringAppend(&buffer, head, -1); } - pathPrefix = TclDStringToObj(&buffer); + pathPrefix = Tcl_DStringToObj(&buffer); Tcl_IncrRefCount(pathPrefix); globFlags |= TCL_GLOBMODE_DIR; if (c != '\0') { @@ -2427,7 +2427,7 @@ DoGlob( */ if (pathPtr == NULL) { - joinedPtr = TclDStringToObj(&append); + joinedPtr = Tcl_DStringToObj(&append); } else if (flags) { joinedPtr = TclNewFSPathObj(pathPtr, Tcl_DStringValue(&append), Tcl_DStringLength(&append)); diff --git a/generic/tclInt.h b/generic/tclInt.h index 2d29e1d..8c5d1da 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3128,7 +3128,6 @@ MODULE_SCOPE char * TclDStringAppendObj(Tcl_DString *dsPtr, Tcl_Obj *objPtr); MODULE_SCOPE char * TclDStringAppendDString(Tcl_DString *dsPtr, Tcl_DString *toAppendPtr); -MODULE_SCOPE Tcl_Obj * TclDStringToObj(Tcl_DString *dsPtr); MODULE_SCOPE Tcl_Obj *const *TclFetchEnsembleRoot(Tcl_Interp *interp, Tcl_Obj *const *objv, int objc, int *objcPtr); MODULE_SCOPE Tcl_Obj *const *TclEnsembleGetRewriteValues(Tcl_Interp *interp); diff --git a/generic/tclMain.c b/generic/tclMain.c index 5083383..628deaa 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -55,7 +55,7 @@ NewNativeObj( #else Tcl_ExternalToUtfDString(NULL, (char *)string, -1, &ds); #endif - return TclDStringToObj(&ds); + return Tcl_DStringToObj(&ds); } /* diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 250ad6a..87aed3a 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -2295,7 +2295,7 @@ SetFsPathFromAny( Tcl_DStringFree(&userName); } - transPtr = TclDStringToObj(&temp); + transPtr = Tcl_DStringToObj(&temp); if (split != len) { /* @@ -2657,7 +2657,7 @@ TclGetHomeDirObj( if (MakeTildeRelativePath(interp, user, NULL, &dirString) != TCL_OK) { return NULL; } - return TclDStringToObj(&dirString); + return Tcl_DStringToObj(&dirString); } /* @@ -2729,7 +2729,7 @@ TclResolveTildePath( } Tcl_DStringFree(&userName); } - return TclDStringToObj(&resolvedPath); + return Tcl_DStringToObj(&resolvedPath); } /* diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index ff7c72c..bb4ffc9 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -959,7 +959,7 @@ CompileRegexp( if (TclReToGlob(NULL, string, length, &stringBuf, &exact, NULL) == TCL_OK) { - regexpPtr->globObjPtr = TclDStringToObj(&stringBuf); + regexpPtr->globObjPtr = Tcl_DStringToObj(&stringBuf); Tcl_IncrRefCount(regexpPtr->globObjPtr); } else { regexpPtr->globObjPtr = NULL; diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index ad60fc3..b3eb0de 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -2055,6 +2055,10 @@ const TclStubs tclStubs = { Tcl_GetNumber, /* 681 */ Tcl_RemoveChannelMode, /* 682 */ Tcl_GetEncodingNulLength, /* 683 */ + 0, /* 684 */ + 0, /* 685 */ + 0, /* 686 */ + Tcl_DStringToObj, /* 687 */ }; /* !END!: Do not edit above this line. */ diff --git a/generic/tclTest.c b/generic/tclTest.c index 2ebbcc2..bc3b553 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -1936,6 +1936,11 @@ TestdstringCmd( goto wrongNumArgs; } Tcl_DStringResult(interp, &dstring); + } else if (strcmp(argv[1], "toobj") == 0) { + if (argc != 2) { + goto wrongNumArgs; + } + Tcl_SetObjResult(interp, Tcl_DStringToObj(&dstring)); } else if (strcmp(argv[1], "trunc") == 0) { if (argc != 3) { goto wrongNumArgs; @@ -1951,8 +1956,8 @@ TestdstringCmd( Tcl_DStringStartSublist(&dstring); } else { Tcl_AppendResult(interp, "bad option \"", argv[1], - "\": must be append, element, end, free, get, length, " - "result, trunc, or start", NULL); + "\": must be append, element, end, free, get, gresult, length, " + "result, start, toobj, or trunc", NULL); return TCL_ERROR; } return TCL_OK; diff --git a/generic/tclUtil.c b/generic/tclUtil.c index ab97461..73f5cf2 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -2973,7 +2973,7 @@ Tcl_DStringResult( Tcl_DString *dsPtr) /* Dynamic string that is to become the * result of interp. */ { - Tcl_SetObjResult(interp, TclDStringToObj(dsPtr)); + Tcl_SetObjResult(interp, Tcl_DStringToObj(dsPtr)); } /* @@ -3087,7 +3087,7 @@ Tcl_DStringGetResult( /* *---------------------------------------------------------------------- * - * TclDStringToObj -- + * Tcl_DStringToObj -- * * This function moves a dynamic string's contents to a new Tcl_Obj. Be * aware that this function does *not* check that the encoding of the @@ -3107,7 +3107,7 @@ Tcl_DStringGetResult( */ Tcl_Obj * -TclDStringToObj( +Tcl_DStringToObj( Tcl_DString *dsPtr) { Tcl_Obj *result; diff --git a/generic/tclZlib.c b/generic/tclZlib.c index f6d7660..61dc0ee 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -548,7 +548,7 @@ ExtractHeader( Tcl_ExternalToUtfDString(latin1enc, (char *) headerPtr->comment, -1, &tmp); - SetValue(dictObj, "comment", TclDStringToObj(&tmp)); + SetValue(dictObj, "comment", Tcl_DStringToObj(&tmp)); } SetValue(dictObj, "crc", Tcl_NewBooleanObj(headerPtr->hcrc)); if (headerPtr->name != Z_NULL) { @@ -565,7 +565,7 @@ ExtractHeader( Tcl_ExternalToUtfDString(latin1enc, (char *) headerPtr->name, -1, &tmp); - SetValue(dictObj, "filename", TclDStringToObj(&tmp)); + SetValue(dictObj, "filename", Tcl_DStringToObj(&tmp)); } if (headerPtr->os != 255) { SetValue(dictObj, "os", Tcl_NewWideIntObj(headerPtr->os)); |