diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-05-10 15:37:12 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-05-10 15:37:12 (GMT) |
commit | b8ac435e96ce56ef3a6a8b8b60feb1bb3dd7c95a (patch) | |
tree | 607e11001a09611e5d43c9a62f5c9876d4f740c0 /generic/tclStringObj.c | |
parent | c0c0164a7120bc2018c400cb82da9f14c5b921db (diff) | |
parent | 301c2624cdf04fcd5e6399378496f9f52259424e (diff) | |
download | tcl-b8ac435e96ce56ef3a6a8b8b60feb1bb3dd7c95a.zip tcl-b8ac435e96ce56ef3a6a8b8b60feb1bb3dd7c95a.tar.gz tcl-b8ac435e96ce56ef3a6a8b8b60feb1bb3dd7c95a.tar.bz2 |
Rebase to latest 8.7
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r-- | generic/tclStringObj.c | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 0e47487..ef5a993 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -908,7 +908,6 @@ TclGetUniChar( *---------------------------------------------------------------------- */ -#undef Tcl_GetUnicodeFromObj #ifndef TCL_NO_DEPRECATED #undef Tcl_GetUnicode unsigned short * @@ -916,14 +915,14 @@ Tcl_GetUnicode( Tcl_Obj *objPtr) /* The object to find the Unicode string * for. */ { - return TclGetUnicodeFromObj(objPtr, NULL); + return Tcl_GetUnicodeFromObj(objPtr, NULL); } #endif /* TCL_NO_DEPRECATED */ /* *---------------------------------------------------------------------- * - * Tcl_GetUnicodeFromObj/TclGetUnicodeFromObj -- + * Tcl_GetUnicodeFromObj -- * * Get the Unicode form of the String object with length. If the object * is not already a String object, it will be converted to one. If the @@ -983,31 +982,6 @@ Tcl_GetUnicodeFromObj( return stringPtr->unicode; } #endif - -#if !defined(TCL_NO_DEPRECATED) -unsigned short * -TclGetUnicodeFromObj( - Tcl_Obj *objPtr, /* The object to find the unicode string - * for. */ - void *lengthPtr) /* If non-NULL, the location where the string - * rep's unichar length should be stored. If - * NULL, no length is stored. */ -{ - String *stringPtr; - -#if TCL_UTF_MAX > 3 - SetUTF16StringFromAny(NULL, objPtr); -#else - SetStringFromAny(NULL, objPtr); -#endif - stringPtr = GET_STRING(objPtr); - - if (lengthPtr != NULL) { - *(ptrdiff_t *)lengthPtr = stringPtr->numChars; - } - return stringPtr->unicode; -} -#endif /* *---------------------------------------------------------------------- @@ -1842,7 +1816,7 @@ Tcl_AppendObjToObj( */ TclAppendBytesToByteArray(objPtr, - TclGetByteArrayFromObj(appendObjPtr, NULL), lengthSrc); + Tcl_GetByteArrayFromObj(appendObjPtr, NULL), lengthSrc); return; } @@ -3420,7 +3394,7 @@ TclStringRepeat( done *= 2; } TclAppendBytesToByteArray(objResultPtr, - TclGetByteArrayFromObj(objResultPtr, NULL), + Tcl_GetByteArrayFromObj(objResultPtr, NULL), (count - done) * length); } else if (unichar) { /* @@ -4313,7 +4287,7 @@ TclStringReverse( if (!inPlace || Tcl_IsShared(objPtr)) { objPtr = Tcl_NewByteArrayObj(NULL, numBytes); } - ReverseBytes(TclGetByteArrayFromObj(objPtr, NULL), from, numBytes); + ReverseBytes(Tcl_GetByteArrayFromObj(objPtr, NULL), from, numBytes); return objPtr; } |