Skip to content
Tcl Source Code Artifact [edb43f46a8]
Login

Artifact [edb43f46a8]

Artifact edb43f46a89d276aefbdfe88aecccac9fcba1664:

Ticket change [edb43f46a8] - Ticket [3598875fffffffff|3598875fff] <i>new macro TclFreeIfRefCountZero</i> status still Open with 4 other changes by ferrieux on 2012-12-31 18:19:26.
D 2012-12-31T18:19:26
J icomment >\sTcl_SetObjResult(interp,\sTcl_NewIntObj(123));\n>\s\s\s\s\s....\swould\shave\sto\sbecome:\n>\sTcl_Obj\s*resultObj\s=\sTcl_NewIntObj(123);\n>\sTcl_SetObjResult(interp,\sresultObj);\n>\sTcl_DecrRefCount(resultObj);\n\nUnless,\sof\scourse,\sthe\scontract\sof\sSetObjResult\sis\saltered\sto\s*not*\sincrRefCount\s!\n\nObviously,\safter\sa\sdecade\sof\sexistence,\sthe\screate-at-zero\sprinciple\shas\spervaded\sall\sAPIs,\sand\sI\sam\snot\sminimizing\sthe\scost\sof\sa\sswitch.\sBut\sa\sfair\sevaluation\smust\stake\sthis\s"contamination"\sinto\saccount\sand\sallow\sfor\seach\ssolution\sto\sassume\scooperation\sfrom\sthe\srest\s;)\n\n>\sCode\swritten\sfor\sone\spattern\scannot\sbe\sconverted\sto\sthe\sother\n>\sby\smacro.\sYes,\swe've\sagreed\sto\slook\sat\sbreaking\sthings\swhere\n>\snecessary,\sbut\sthis\sis\sa\slot\sof\sbreakage\sfor\svery\squestionable\sgain.\n\n*This*\sis\sthe\swinning\sargument\s!\nThanks\sfor\srecording\sit\shere;\snow\swe\scan\sproceed\swith\sJan's\sTclFreeIfRefCountZero\smacro,\swhich\srespects\sthe\scurrent\ssemantics\sbut\sallows\sfor\sa\scleaner\srefcount/lifecycle\srule\sfor\sobjects:\snow\sthey\sshould\sonly\sexceptionally\sdie\sat\s-1.\n
J login ferrieux
J mimetype text/plain
J username ferrieux
K 3598875fffffffffffffffffffffffffffffffff
U ferrieux
Z 739c67b7a66150fcc3252bccb053a942