Manifest of check-in
[59f23bd2a8]
- * generic/tclStringObj.c: Revisions so that we avoid creating
the strange representation of an empty string with
objPtr->bytes == NULL and stringPtr->hasUnicode == 0. Instead in
the situations where that was being created, create a traditional
two-legged stork representation (objPtr->bytes = tclEmptyStringRep
and stringPtr->hasUnicode = 1). In the situations where the strange
rep was treated differently, continue to do so by testing
stringPtr->numChars == 0 to detect it. These changes make the code
more conventional so easier for new maintainers to pick up. Also
sets up further simplifications.
by
dgp on
2009-02-14 23:07:17.
B ac61ee395893ab793e426d97e8fa37554b4f8ed7
C \s\s\s\s\s\s\s\s*\sgeneric/tclStringObj.c:\s\s\s\s\s\s\sRevisions\sso\sthat\swe\savoid\screating\n\s\s\s\s\s\s\s\sthe\sstrange\srepresentation\sof\san\sempty\sstring\swith\n\s\s\s\s\s\s\s\sobjPtr->bytes\s==\sNULL\sand\sstringPtr->hasUnicode\s==\s0.\s\sInstead\sin\n\s\s\s\s\s\s\s\sthe\ssituations\swhere\sthat\swas\sbeing\screated,\screate\sa\straditional\n\s\s\s\s\s\s\s\stwo-legged\sstork\srepresentation\s(objPtr->bytes\s=\stclEmptyStringRep\n\s\s\s\s\s\s\s\sand\sstringPtr->hasUnicode\s=\s1).\s\sIn\sthe\ssituations\swhere\sthe\sstrange\n\s\s\s\s\s\s\s\srep\swas\streated\sdifferently,\scontinue\sto\sdo\sso\sby\stesting\n\s\s\s\s\s\s\s\sstringPtr->numChars\s==\s0\sto\sdetect\sit.\s\sThese\schanges\smake\sthe\scode\n\s\s\s\s\s\s\s\smore\sconventional\sso\seasier\sfor\snew\smaintainers\sto\spick\sup.\s\sAlso\n\s\s\s\s\s\s\s\ssets\sup\sfurther\ssimplifications.\n
D 2009-02-14T23:07:17
F ChangeLog 9b0ff9f1be643a8bfc3f40b1ddb57b1241c20527
F generic/tclExecute.c 3f51ca59b805e18cecb03e586fcb917386f357cc
F generic/tclInt.h 8e6d3eeb7fc8d312b5c6c9091adbbc5706b4fc59
F generic/tclStringObj.c 370f521fd21a1cf1f91c2bd3ffabe7d51e97c060
F generic/tclTestObj.c 14c0c5eaaec7d46c59c737eb849cafe91da93bf9
P 701671c72ea95656f7eb0607bf9a87cc85efaa04
U dgp
Z ddd18aa74fa4e6358955555921420e8e