diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-11-08 09:12:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-11-08 09:12:13 (GMT) |
commit | 994d65042ff6ea1aa6dc4b8e9da020b27817f0c6 (patch) | |
tree | bb5c952eb3d8d7fe5d5a020a1a0cd4803c5b1d98 | |
parent | fcccf8ec89035dac2b9d50f08c163cb4125feecb (diff) | |
download | tcl-994d65042ff6ea1aa6dc4b8e9da020b27817f0c6.zip tcl-994d65042ff6ea1aa6dc4b8e9da020b27817f0c6.tar.gz tcl-994d65042ff6ea1aa6dc4b8e9da020b27817f0c6.tar.bz2 |
Tcl_GetByteArrayFromObj -> Tcl_GetBytesFromObj everywhere in core, since it has the possibility of better error-reporting. This fixes the -DTCL_NO_DEPRECATED build failure
-rw-r--r-- | generic/tclBinary.c | 12 | ||||
-rw-r--r-- | generic/tclExecute.c | 6 | ||||
-rw-r--r-- | generic/tclIO.c | 10 | ||||
-rw-r--r-- | generic/tclIOGT.c | 6 | ||||
-rw-r--r-- | generic/tclIORChan.c | 4 | ||||
-rw-r--r-- | generic/tclIORTrans.c | 18 | ||||
-rw-r--r-- | generic/tclLink.c | 2 | ||||
-rw-r--r-- | generic/tclStringObj.c | 50 | ||||
-rw-r--r-- | generic/tclUtil.c | 4 | ||||
-rw-r--r-- | generic/tclZipfs.c | 2 | ||||
-rw-r--r-- | generic/tclZlib.c | 16 |
11 files changed, 65 insertions, 65 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c index a09eacb..f14685a 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -892,7 +892,7 @@ BinaryFormatCmd( goto badIndex; } if (count == BINARY_ALL) { - if (Tcl_GetByteArrayFromObj(objv[arg], &count) == NULL) { + if (Tcl_GetBytesFromObj(NULL, objv[arg], &count) == NULL) { count = Tcl_GetCharLength(objv[arg]); } } else if (count == BINARY_NOCOUNT) { @@ -1063,7 +1063,7 @@ BinaryFormatCmd( unsigned char *bytes; Tcl_Obj *copy = TclNarrowToBytes(objv[arg++]); - bytes = Tcl_GetByteArrayFromObj(copy, &length); + bytes = Tcl_GetBytesFromObj(NULL, copy, &length); if (count == BINARY_ALL) { count = length; @@ -2508,7 +2508,7 @@ BinaryDecodeHex( } TclNewObj(resultObj); - data = Tcl_GetByteArrayFromObj(objv[objc - 1], &count); + data = Tcl_GetBytesFromObj(NULL, objv[objc - 1], &count); if (data == NULL) { pure = 0; data = (unsigned char *) Tcl_GetStringFromObj(objv[objc - 1], &count); @@ -2641,7 +2641,7 @@ BinaryEncode64( } break; case OPT_WRAPCHAR: - wrapchar = (const char *)Tcl_GetByteArrayFromObj( + wrapchar = (const char *)Tcl_GetBytesFromObj(NULL, objv[i + 1], &wrapcharlen); if (wrapchar == NULL) { purewrap = 0; @@ -2912,7 +2912,7 @@ BinaryDecodeUu( } TclNewObj(resultObj); - data = Tcl_GetByteArrayFromObj(objv[objc - 1], &count); + data = Tcl_GetBytesFromObj(NULL, objv[objc - 1], &count); if (data == NULL) { pure = 0; data = (unsigned char *) Tcl_GetStringFromObj(objv[objc - 1], &count); @@ -3087,7 +3087,7 @@ BinaryDecode64( } TclNewObj(resultObj); - data = Tcl_GetByteArrayFromObj(objv[objc - 1], &count); + data = Tcl_GetBytesFromObj(NULL, objv[objc - 1], &count); if (data == NULL) { pure = 0; data = (unsigned char *) Tcl_GetStringFromObj(objv[objc - 1], &count); diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 3f8f87a..8149532 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -5336,7 +5336,7 @@ TEBCresume( TclNewObj(objResultPtr); } else if (TclIsPureByteArray(valuePtr)) { objResultPtr = Tcl_NewByteArrayObj( - Tcl_GetByteArrayFromObj(valuePtr, (Tcl_Size *)NULL)+index, 1); + Tcl_GetBytesFromObj(NULL, valuePtr, (Tcl_Size *)NULL)+index, 1); } else if (valuePtr->bytes && slength == valuePtr->length) { objResultPtr = Tcl_NewStringObj((const char *) valuePtr->bytes+index, 1); @@ -5597,8 +5597,8 @@ TEBCresume( unsigned char *bytes1, *bytes2; Tcl_Size wlen1 = 0, wlen2 = 0; - bytes1 = Tcl_GetByteArrayFromObj(valuePtr, &wlen1); - bytes2 = Tcl_GetByteArrayFromObj(value2Ptr, &wlen2); + bytes1 = Tcl_GetBytesFromObj(NULL, valuePtr, &wlen1); + bytes2 = Tcl_GetBytesFromObj(NULL, value2Ptr, &wlen2); match = TclByteArrayMatch(bytes1, wlen1, bytes2, wlen2, 0); } else { match = Tcl_StringCaseMatch(TclGetString(valuePtr), diff --git a/generic/tclIO.c b/generic/tclIO.c index 664d657..4c3c692 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -4192,7 +4192,7 @@ Tcl_WriteChars( } objPtr = Tcl_NewStringObj(src, len); - src = (char *) Tcl_GetByteArrayFromObj(objPtr, &len); + src = (char *) Tcl_GetBytesFromObj(NULL, objPtr, &len); if (src == NULL) { Tcl_SetErrno(EILSEQ); result = TCL_INDEX_NONE; @@ -4251,7 +4251,7 @@ Tcl_WriteObj( if (statePtr->encoding == NULL) { Tcl_Size result; - src = (char *) Tcl_GetByteArrayFromObj(objPtr, &srcLen); + src = (char *) Tcl_GetBytesFromObj(NULL, objPtr, &srcLen); if (src == NULL) { Tcl_SetErrno(EILSEQ); result = TCL_INDEX_NONE; @@ -4638,7 +4638,7 @@ Tcl_GetsObj( if (statePtr->encoding == GetBinaryEncoding() && ((statePtr->inputTranslation == TCL_TRANSLATE_LF) || (statePtr->inputTranslation == TCL_TRANSLATE_CR)) - && Tcl_GetByteArrayFromObj(objPtr, (Tcl_Size *)NULL) != NULL) { + && Tcl_GetBytesFromObj(NULL, objPtr, (Tcl_Size *)NULL) != NULL) { return TclGetsObjBinary(chan, objPtr); } @@ -5052,7 +5052,7 @@ TclGetsObjBinary( * newline in the available input. */ - byteArray = Tcl_GetByteArrayFromObj(objPtr, &byteLen); + byteArray = Tcl_GetBytesFromObj(NULL, objPtr, &byteLen); if (byteArray == NULL) { Tcl_SetErrno(EILSEQ); return -1; @@ -5977,7 +5977,7 @@ DoReadChars( && (statePtr->inEofChar == '\0'); if (appendFlag) { - if (binaryMode && (NULL == Tcl_GetByteArrayFromObj(objPtr, (Tcl_Size *)NULL))) { + if (binaryMode && (NULL == Tcl_GetBytesFromObj(NULL, objPtr, (Tcl_Size *)NULL))) { binaryMode = 0; } } else { diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c index b2b959d..4ef4bb0 100644 --- a/generic/tclIOGT.c +++ b/generic/tclIOGT.c @@ -445,7 +445,7 @@ ExecuteCallback( break; } resObj = Tcl_GetObjResult(eval); - resBuf = Tcl_GetByteArrayFromObj(resObj, &resLen); + resBuf = Tcl_GetBytesFromObj(NULL, resObj, &resLen); if (resBuf) { Tcl_WriteRaw(Tcl_GetStackedChannel(dataPtr->self), (char *) resBuf, resLen); @@ -458,7 +458,7 @@ ExecuteCallback( break; } resObj = Tcl_GetObjResult(eval); - resBuf = Tcl_GetByteArrayFromObj(resObj, &resLen); + resBuf = Tcl_GetBytesFromObj(NULL, resObj, &resLen); if (resBuf) { Tcl_WriteRaw(dataPtr->self, (char *) resBuf, resLen); break; @@ -467,7 +467,7 @@ ExecuteCallback( case TRANSMIT_IBUF: resObj = Tcl_GetObjResult(eval); - resBuf = Tcl_GetByteArrayFromObj(resObj, &resLen); + resBuf = Tcl_GetBytesFromObj(NULL, resObj, &resLen); if (resBuf) { ResultAdd(&dataPtr->result, resBuf, resLen); break; diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 6ba6ad8..93a8b5a 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -1391,7 +1391,7 @@ ReflectInput( goto invalid; } - bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + bytev = Tcl_GetBytesFromObj(NULL, resObj, &bytec); if (bytev == NULL) { SetChannelErrorStr(rcPtr->chan, msg_read_nonbyte); @@ -3129,7 +3129,7 @@ ForwardProc( Tcl_Size bytec = 0; /* Number of returned bytes */ unsigned char *bytev; /* Array of returned bytes */ - bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + bytev = Tcl_GetBytesFromObj(NULL, resObj, &bytec); if (bytev == NULL) { ForwardSetStaticError(paramPtr, msg_read_nonbyte); diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 9328de8..a7bef43 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -2567,7 +2567,7 @@ ForwardProc( unsigned char *bytev; /* Array of returned bytes */ - bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + bytev = Tcl_GetBytesFromObj(NULL, resObj, &bytec); paramPtr->transform.size = bytec; @@ -2601,7 +2601,7 @@ ForwardProc( unsigned char *bytev; /* Array of returned bytes */ - bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + bytev = Tcl_GetBytesFromObj(NULL, resObj, &bytec); paramPtr->transform.size = bytec; @@ -2630,7 +2630,7 @@ ForwardProc( Tcl_Size bytec = 0; /* Number of returned bytes */ unsigned char *bytev; /* Array of returned bytes */ - bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + bytev = Tcl_GetBytesFromObj(NULL, resObj, &bytec); paramPtr->transform.size = bytec; @@ -2657,7 +2657,7 @@ ForwardProc( unsigned char *bytev; /* Array of returned bytes */ - bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + bytev = Tcl_GetBytesFromObj(NULL, resObj, &bytec); paramPtr->transform.size = bytec; @@ -3057,7 +3057,7 @@ TransformRead( if (rtPtr->thread != Tcl_GetCurrentThread()) { ForwardParam p; - p.transform.buf = (char *) Tcl_GetByteArrayFromObj(bufObj, + p.transform.buf = (char *) Tcl_GetBytesFromObj(NULL, bufObj, &(p.transform.size)); ForwardOpToOwnerThread(rtPtr, ForwardedInput, &p); @@ -3085,7 +3085,7 @@ TransformRead( return 0; } - bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + bytev = Tcl_GetBytesFromObj(NULL, resObj, &bytec); ResultAdd(&rtPtr->result, bytev, bytec); Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ @@ -3147,7 +3147,7 @@ TransformWrite( *errorCodePtr = EOK; - bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + bytev = Tcl_GetBytesFromObj(NULL, resObj, &bytec); res = Tcl_WriteRaw(rtPtr->parent, (char *) bytev, bytec); Tcl_DecrRefCount(bufObj); @@ -3200,7 +3200,7 @@ TransformDrain( return 0; } - bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + bytev = Tcl_GetBytesFromObj(NULL, resObj, &bytec); ResultAdd(&rtPtr->result, bytev, bytec); Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ @@ -3256,7 +3256,7 @@ TransformFlush( } if (op == FLUSH_WRITE) { - bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + bytev = Tcl_GetBytesFromObj(NULL, resObj, &bytec); res = Tcl_WriteRaw(rtPtr->parent, (char *) bytev, bytec); } else { res = 0; diff --git a/generic/tclLink.c b/generic/tclLink.c index b136709..cb56bd6 100644 --- a/generic/tclLink.c +++ b/generic/tclLink.c @@ -879,7 +879,7 @@ LinkTraceProc( return NULL; case TCL_LINK_BINARY: - value = (char *) Tcl_GetByteArrayFromObj(valueObj, &valueLength); + value = (char *) Tcl_GetBytesFromObj(NULL, valueObj, &valueLength); if (value == NULL) { return (char *) "invalid binary value"; } else if (valueLength != linkPtr->bytes) { diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index b1f14b5..598a2e5 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -402,7 +402,7 @@ Tcl_GetCharLength( */ if (TclIsPureByteArray(objPtr)) { - (void) Tcl_GetByteArrayFromObj(objPtr, &numChars); + (void) Tcl_GetBytesFromObj(NULL, objPtr, &numChars); return numChars; } @@ -453,7 +453,7 @@ TclGetCharLength( */ if (TclIsPureByteArray(objPtr)) { - (void) Tcl_GetByteArrayFromObj(objPtr, &numChars); + (void) Tcl_GetBytesFromObj(NULL, objPtr, &numChars); } else { Tcl_GetString(objPtr); numChars = TclNumUtfChars(objPtr->bytes, objPtr->length); @@ -548,7 +548,7 @@ Tcl_GetUniChar( if (TclIsPureByteArray(objPtr)) { Tcl_Size length = 0; - unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, &length); + unsigned char *bytes = Tcl_GetBytesFromObj(NULL, objPtr, &length); if (index >= length) { return -1; } @@ -607,7 +607,7 @@ TclGetUniChar( if (TclIsPureByteArray(objPtr)) { Tcl_Size length = 0; - unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, &length); + unsigned char *bytes = Tcl_GetBytesFromObj(NULL, objPtr, &length); if (index >= length) { return -1; } @@ -740,7 +740,7 @@ Tcl_GetRange( */ if (TclIsPureByteArray(objPtr)) { - unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, &length); + unsigned char *bytes = Tcl_GetBytesFromObj(NULL, objPtr, &length); if (last < 0 || last >= length) { last = length - 1; @@ -818,7 +818,7 @@ TclGetRange( */ if (TclIsPureByteArray(objPtr)) { - unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, &length); + unsigned char *bytes = Tcl_GetBytesFromObj(NULL, objPtr, &length); if (last < 0 || last >= length) { last = length - 1; @@ -1406,7 +1406,7 @@ Tcl_AppendObjToObj( /* * One might expect the code here to be * - * bytes = Tcl_GetByteArrayFromObj(appendObjPtr, &length); + * bytes = Tcl_GetBytesFromObj(NULL, appendObjPtr, &length); * TclAppendBytesToByteArray(objPtr, bytes, length); * * and essentially all of the time that would be fine. However, it @@ -1424,8 +1424,8 @@ Tcl_AppendObjToObj( Tcl_Size lengthSrc = 0; - (void) Tcl_GetByteArrayFromObj(objPtr, &length); - (void) Tcl_GetByteArrayFromObj(appendObjPtr, &lengthSrc); + (void) Tcl_GetBytesFromObj(NULL, objPtr, &length); + (void) Tcl_GetBytesFromObj(NULL, appendObjPtr, &lengthSrc); /* * Grow buffer enough for the append. @@ -1445,7 +1445,7 @@ Tcl_AppendObjToObj( */ TclAppendBytesToByteArray(objPtr, - Tcl_GetByteArrayFromObj(appendObjPtr, (Tcl_Size *) NULL), lengthSrc); + Tcl_GetBytesFromObj(NULL, appendObjPtr, (Tcl_Size *) NULL), lengthSrc); return; } @@ -2956,7 +2956,7 @@ TclStringRepeat( if (binary) { /* Result will be pure byte array. Pre-size it */ - (void)Tcl_GetByteArrayFromObj(objPtr, &length); + (void)Tcl_GetBytesFromObj(NULL, objPtr, &length); maxCount = TCL_SIZE_MAX; } else if (unichar) { /* Result will be pure Tcl_UniChar array. Pre-size it. */ @@ -2999,7 +2999,7 @@ TclStringRepeat( done *= 2; } TclAppendBytesToByteArray(objResultPtr, - Tcl_GetByteArrayFromObj(objResultPtr, (Tcl_Size *) NULL), + Tcl_GetBytesFromObj(NULL, objResultPtr, (Tcl_Size *) NULL), (count - done) * length); } else if (unichar) { /* @@ -3170,7 +3170,7 @@ TclStringCat( */ if (TclIsPureByteArray(objPtr)) { - (void)Tcl_GetByteArrayFromObj(objPtr, &numBytes); /* PANIC? */ + (void)Tcl_GetBytesFromObj(NULL, objPtr, &numBytes); /* PANIC? */ if (numBytes) { last = objc - oc; @@ -3319,7 +3319,7 @@ TclStringCat( Tcl_Size start = 0; objResultPtr = *objv++; objc--; - (void)Tcl_GetByteArrayFromObj(objResultPtr, &start); + (void)Tcl_GetBytesFromObj(NULL, objResultPtr, &start); dst = Tcl_SetByteArrayLength(objResultPtr, length) + start; } else { objResultPtr = Tcl_NewByteArrayObj(NULL, length); @@ -3336,7 +3336,7 @@ TclStringCat( if (TclIsPureByteArray(objPtr)) { Tcl_Size more = 0; - unsigned char *src = Tcl_GetByteArrayFromObj(objPtr, &more); + unsigned char *src = Tcl_GetBytesFromObj(NULL, objPtr, &more); memcpy(dst, src, more); dst += more; } @@ -3500,8 +3500,8 @@ TclStringCmp( * arrays anyway, and we have no memcasecmp() for some reason... :^) */ - s1 = (char *) Tcl_GetByteArrayFromObj(value1Ptr, &s1len); - s2 = (char *) Tcl_GetByteArrayFromObj(value2Ptr, &s2len); + s1 = (char *) Tcl_GetBytesFromObj(NULL, value1Ptr, &s1len); + s2 = (char *) Tcl_GetBytesFromObj(NULL, value2Ptr, &s2len); memCmpFn = memcmp; } else if (TclHasInternalRep(value1Ptr, &tclStringType) && TclHasInternalRep(value2Ptr, &tclStringType)) { @@ -3690,10 +3690,10 @@ TclStringFirst( if (TclIsPureByteArray(needle) && TclIsPureByteArray(haystack)) { unsigned char *end, *check, *bh; - unsigned char *bn = Tcl_GetByteArrayFromObj(needle, &ln); + unsigned char *bn = Tcl_GetBytesFromObj(NULL, needle, &ln); /* Find bytes in bytes */ - bh = Tcl_GetByteArrayFromObj(haystack, &lh); + bh = Tcl_GetBytesFromObj(NULL, haystack, &lh); if ((lh < ln) || (start > lh - ln)) { /* Don't start the loop if there cannot be a valid answer */ goto firstEnd; @@ -3796,8 +3796,8 @@ TclStringLast( } if (TclIsPureByteArray(needle) && TclIsPureByteArray(haystack)) { - unsigned char *check, *bh = Tcl_GetByteArrayFromObj(haystack, &lh); - unsigned char *bn = Tcl_GetByteArrayFromObj(needle, &ln); + unsigned char *check, *bh = Tcl_GetBytesFromObj(NULL, haystack, &lh); + unsigned char *bn = Tcl_GetBytesFromObj(NULL, needle, &ln); if (last >= lh) { last = lh - 1; @@ -3896,12 +3896,12 @@ TclStringReverse( if (TclIsPureByteArray(objPtr)) { Tcl_Size numBytes = 0; - unsigned char *from = Tcl_GetByteArrayFromObj(objPtr, &numBytes); + unsigned char *from = Tcl_GetBytesFromObj(NULL, objPtr, &numBytes); if (!inPlace || Tcl_IsShared(objPtr)) { objPtr = Tcl_NewByteArrayObj(NULL, numBytes); } - ReverseBytes(Tcl_GetByteArrayFromObj(objPtr, (Tcl_Size *)NULL), from, numBytes); + ReverseBytes(Tcl_GetBytesFromObj(NULL, objPtr, (Tcl_Size *)NULL), from, numBytes); return objPtr; } @@ -4048,7 +4048,7 @@ TclStringReplace( if (TclIsPureByteArray(objPtr)) { Tcl_Size numBytes = 0; - unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, &numBytes); + unsigned char *bytes = Tcl_GetBytesFromObj(NULL, objPtr, &numBytes); if (insertPtr == NULL) { /* Replace something with nothing. */ @@ -4072,7 +4072,7 @@ TclStringReplace( if (TclIsPureByteArray(insertPtr)) { Tcl_Size newBytes = 0; unsigned char *iBytes - = Tcl_GetByteArrayFromObj(insertPtr, &newBytes); + = Tcl_GetBytesFromObj(NULL, insertPtr, &newBytes); if (count == newBytes && inPlace && !Tcl_IsShared(objPtr)) { /* diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 579d822..6f0aa34 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -2538,8 +2538,8 @@ TclStringMatchObj( && !flags) { unsigned char *data, *ptn; - data = Tcl_GetByteArrayFromObj(strObj, &length); - ptn = Tcl_GetByteArrayFromObj(ptnObj, &plen); + data = Tcl_GetBytesFromObj(NULL, strObj, &length); + ptn = Tcl_GetBytesFromObj(NULL, ptnObj, &plen); match = TclByteArrayMatch(data, length, ptn, plen, 0); } else { match = Tcl_StringCaseMatch(TclGetString(strObj), diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index cdf8646..54eb4b0 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -2758,7 +2758,7 @@ ZipFSMkKeyObjCmd( } passObj = Tcl_NewByteArrayObj(NULL, 264); - passBuf = Tcl_GetByteArrayFromObj(passObj, (Tcl_Size *)NULL); + passBuf = Tcl_GetBytesFromObj(NULL, passObj, (Tcl_Size *)NULL); while (len > 0) { int ch = pw[len - 1]; diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 5a63dcf..739e506 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -625,7 +625,7 @@ SetInflateDictionary( { if (compDictObj != NULL) { Tcl_Size length = 0; - unsigned char *bytes = Tcl_GetByteArrayFromObj(compDictObj, &length); + unsigned char *bytes = Tcl_GetBytesFromObj(NULL, compDictObj, &length); if (bytes == NULL) { return Z_DATA_ERROR; @@ -642,7 +642,7 @@ SetDeflateDictionary( { if (compDictObj != NULL) { Tcl_Size length = 0; - unsigned char *bytes = Tcl_GetByteArrayFromObj(compDictObj, &length); + unsigned char *bytes = Tcl_GetBytesFromObj(NULL, compDictObj, &length); if (bytes == NULL) { return Z_DATA_ERROR; @@ -1190,7 +1190,7 @@ Tcl_ZlibStreamSetCompressionDictionary( { ZlibStreamHandle *zshPtr = (ZlibStreamHandle *) zshandle; - if (compressionDictionaryObj && (NULL == Tcl_GetByteArrayFromObj( + if (compressionDictionaryObj && (NULL == Tcl_GetBytesFromObj(NULL, compressionDictionaryObj, (Tcl_Size *)NULL))) { /* Missing or invalid compression dictionary */ compressionDictionaryObj = NULL; @@ -1423,7 +1423,7 @@ Tcl_ZlibStreamGet( if (Tcl_IsShared(itemObj)) { itemObj = Tcl_DuplicateObj(itemObj); } - itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); + itemPtr = Tcl_GetBytesFromObj(NULL, itemObj, &itemLen); Tcl_IncrRefCount(itemObj); zshPtr->currentInput = itemObj; zshPtr->stream.next_in = itemPtr; @@ -1495,7 +1495,7 @@ Tcl_ZlibStreamGet( if (Tcl_IsShared(itemObj)) { itemObj = Tcl_DuplicateObj(itemObj); } - itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); + itemPtr = Tcl_GetBytesFromObj(NULL, itemObj, &itemLen); Tcl_IncrRefCount(itemObj); zshPtr->currentInput = itemObj; zshPtr->stream.next_in = itemPtr; @@ -1544,7 +1544,7 @@ Tcl_ZlibStreamGet( count = 0; for (i=0; i<listLen; i++) { Tcl_ListObjIndex(NULL, zshPtr->outData, i, &itemObj); - (void) Tcl_GetByteArrayFromObj(itemObj, &itemLen); + (void) Tcl_GetBytesFromObj(NULL, itemObj, &itemLen); if (i == 0) { count += itemLen - zshPtr->outPos; } else { @@ -1569,7 +1569,7 @@ Tcl_ZlibStreamGet( */ Tcl_ListObjIndex(NULL, zshPtr->outData, 0, &itemObj); - itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); + itemPtr = Tcl_GetBytesFromObj(NULL, itemObj, &itemLen); if ((itemLen-zshPtr->outPos) >= count-dataPos) { Tcl_Size len = count - dataPos; @@ -3761,7 +3761,7 @@ ZlibStackChannelTransform( if (compDictObj != NULL) { cd->compDictObj = Tcl_DuplicateObj(compDictObj); Tcl_IncrRefCount(cd->compDictObj); - Tcl_GetByteArrayFromObj(cd->compDictObj, (Tcl_Size *)NULL); + Tcl_GetBytesFromObj(NULL, cd->compDictObj, (Tcl_Size *)NULL); } if (format == TCL_ZLIB_FORMAT_RAW) { |