Artifacts Associated With Ticket 218745
Ticket change [3337f043f7] (rid 106549) by nobody on 2000-10-26 01:04:52:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 1975 Bug Version: 8.1 SubmitDate: '1999-05-04' LastModified: '1999-05-14' Severity: SER Status: Released Submitter: pat ChangedBy: stanton RelatedBugIDs: 2047 OS: Windows NT Machine: X86 FixedDate: '1999-05-07' FixedInVersion: 8.1.1 ClosedDate: '2000-10-25' Name: Matt Newman Extensions: BLT, INCRTCL, TCLX, TNSS, TRF, TCLODBC, SENTCL, LDAP..... CustomShell: Not yet - at last tcl has a binary safe "after" command. Comments: The bug is that when dup'ing the internal rep of a ByteArray it doesn't set the new objects typePtr - which remains NULL so that when append is called the object is assumed to contain no data. ReproducibleScript: set hdr [binary format cc 0 0316] set buf hellomatt set data $hdr #UNCOMMENT TO MAKE WORK!!!#string length $data append data $buf if {[string length $data] == 11} { tclLog GOOD } else { tclLog "BAD: expected 11, got [string length $data]" } ObservedBehavior: Length is returned as 9 not 11. In fact if you uncomment the string length $data line it forces an update of the internal string rep then the script succeeds. DesiredBehavior: Length of 11 Patch: diff -c -r1.1.1.2 tclBinary.c *** tclBinary.c 1999/05/02 23:44:25 1.1.1.2 --- tclBinary.c 1999/05/03 13:37:47 *************** *** 457,462 **** --- 457,463 ---- memcpy((VOID *) copyArrayPtr->bytes, (VOID *) srcArrayPtr->bytes, (size_t) length); SET_BYTEARRAY(copyPtr, copyArrayPtr); + copyPtr->typePtr = &tclByteArrayType; } ♀ /* PatchFiles: generic/tclBinary.c - foundin initialized to: "obsolete: 8.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "Use of ByteArray object type is buggy (PATCH)"
- type initialized to: "Bug"
Ticket change [d431435f55] (rid 123408) by welch on 2000-10-26 08:28:13:
- closedate changed to: "2000-10-26T01:28:13"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [92eda652db] (rid 105728) by dgp on 2001-04-18 06:50:24:
- closedate changed to: "2001-04-17T23:50:24"
- closer changed to: "dgp"
- subsystem changed to: "12. ByteArray Object"