Skip to content
Tcl Source Code Artifact [59de4677ca]
Login

Artifact [59de4677ca]

Artifact 59de4677ca45da7d5b4fcce4de4de973daf793ce:

Ticket change [59de4677ca] - New ticket [1689385fffffffff|1689385fff] <i>Tcl_SetObjLength documentation incomplete</i>. by dgp on 2007-03-27 17:47:01.
D 2007-03-27T17:47:01
J assignee msofer
J cmimetype text/plain
J comment \nThe\sdocumentation\sfor\n\n\s\sTcl_SetObjLength(objPtr,\snewLength)\n\nsuggests\sthat\sit\swill\sleave\nobjPtr->bytes\spointing\sto\sa\sbuffer\nof\sat\sleast\slength\snewLength+1,\nthat\sit\swill\swrite\sa\snull\sbyte\nat\sobjPtr->bytes[newLength],\sand\nthat\sit\swill\sleave\sobjPtr->length\nwith\sthe\snew\svalue\sof\snewLength.\n\nThis\sis\soften\strue.\n\nHowever,\swhen\sobjPtr\spoints\sto\na\spure\sunicode\sobject\swith\sat\sleast\none\smultibyte\scharacter,\sor\swith\nsome\sother\shistory\sthat\sleaves\nobjPtr->bytes\s==\sNULL\sand\nstringPtr->hasUnicode\s!=\s0,\sthen\nTcl_SetObjLength()\smanipulates\nthe\sunicode\srepresentation,\sgrowing\nit\sto\shold\sat\sleast\snewLength\s*characters*\n(not\sbytes).\s\sIt's\spossible\sthat\sa\ncaller\sexpecting\sthe\sdocumentation\sto\sbe\ntrue\smight\sget\sa\snasty\ssurprise.\n\nThe\sability\sto\sgrow\sthe\sunicode\srep\nis\suseful.\s\sPerhaps\sthat\sfunctionality\nshould\shave\sits\sown\sAPI,\srather\sthan\nhaving\sundocumented,\ssemi-magical\smodes\nof\soperation?\n
J foundin obsolete:\s8.5a6
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter dgp
J subsystem 10.\sObjects
J title Tcl_SetObjLength\sdocumentation\sincomplete
J type Bug
K 1689385fffffffffffffffffffffffffffffffff
U dgp
Z f492816b456f658ce3799949a46d1f8f