.
D 2022-08-31T23:43:58.965
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment the\smanpage\sfor\sTcl_TraceVar\sdescribes\sTcl_VarTraceProc\sas\shaving\sthe\sfollowing\r\nstruct\ssignature:\r\n\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\stypedef\schar\s*Tcl_VarTraceProc(\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sClientData\sclientData,\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTcl_Interp\s*interp,\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\schar\s*name1,\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\schar\s*name2,\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sint\sflags);\r\n\r\nBut\sname1\sand\sname2\sshould\shave\sthe\s`const`\squalifier\saccording\sto\stcl.h:\r\n\r\ntypedef\schar\s*\s(Tcl_VarTraceProc)\s(ClientData\sclientData,\sTcl_Interp\s*interp,\r\n\s\sCONST84\schar\s*part1,\sCONST84\schar\s*part2,\sint\sflags);\r\n\r\nI\sfound\sthis\sby\saccident\strying\sto\scompile\sa\slittle\ssample\sfrom\sOusterhout's\r\nbook\susing\sTcl_TraceVar\sin\schapter\s34,\sgcc\scomplained\sabout\sincompatible\spointer\r\ntype\s(for\sthe\scallback)\suntil\sI\sadded\s`const`\sto\sboth\sargs\sin\sthe\sfunction\r\nprototype\sfor\sthe\scallback\ssupplied\sto\sTcl_TraceVar.\r\n\r\nSo,\sjust\sadd\sthe\smissing\s`const`\sto\sboth\schar\s*\sfields\sin\sthis\smanpage\s(and\r\nothers,\sif\sapplicable).\r\n\r\nI\snoticed\sthat\s(my\spdf\sversion\sof)\sOusterhout's\sbook\sin\sseveral\splaces\suses\r\nplain\s`char\s*`\swhere\s`const\schar*`\sshould\sbe\sused,\sperhaps\sthis\sis\sbecause\sat\r\nsome\spoint\sthere\swas\sa\smigration\sto\senforce\sconstness\sand\sdocumentation\swasn't\r\nfully\supdated\sto\sreflect\sthe\schange\s(I'm\sjust\sguessing\shere).
J foundin 8.6
J is_private 0
J login anonymous
J priority 5\sMedium
J private_contact 27aa8ee3249fdc446e4e83e0911e0b4bd4f967b6
J resolution None
J severity Minor
J status Open
J submitter anonymous
J subsystem None
J title Tcl_TraceVar\smanpage\s:\smissing\s`const`\son\schar*\sfields
J type Bug
K 36ec49db6abc3b1a7f136c9fe3adaa02c183517f
U anonymous
Z b2b12621bb1c83f49e854e7566b9c8cc