Skip to content
Tcl Source Code Artifact [323cf06b47]
Login

Artifact [323cf06b47]

Artifact 323cf06b47554c40fdb22ab7695f2c3d6805012a84e3517c10b0a2aa93547631:

Ticket change [323cf06b47] - Ticket [8dd2807066d7cc4d|8dd2807066] <i>bug with [expr]</i> status still Open with 3 other changes by apnadkarni on 2025-11-10 11:14:09.
D 2025-11-10T11:14:09.831
J icomment Jan,\r\n\r\nHuh!\sHow\sabout\s[this](https://core.tcl-lang.org/tcl/info/2bef43598265a9f3)\sthen?\r\n\r\nStill\sWIP\sbecause\sI\shave\stwo\squestions.\r\n\r\nWould\sit\snot\sbe\ssafer\sto\suse\s`Tcl_GetBignumFromObj`\sinstead\sof\s`Tcl_TakeBignumFromObj`\sin\s`TclCompareTwoNumbers`?\sThe\slatter\srequires\scallers\sto\sbe\saware\sthat\sunshared\sobjects\smay\sbe\smodified\sand\sthat\sis\snot\sreally\sintuitive\sfor\sa\sfunction\sthat\sis\sonly\s*comparing*\stwo\svalues.\sIt\sis\snatural\sfor\scallers\sto\sassume\sthe\svalues\swill\sbe\sread-only\sand\sunmodified.\sThere\swould\sbe\sa\ssmall\scost\sin\sperformance\sin\sthe\sunshared\scase\sbut\sstill,\sI\sthink\sit\sis\ssafer\sto\sguard\sagainst\sinadvertent\smisuse.\sWhat\sdo\syou\sthink?\r\n\r\nSecond,\swhen\scomparing\sintegers/doubles\sagainst\sbigints,\sthe\scode\sonly\schecks\swhether\sthe\s`bigint`\sis\s<\s0\sor\s>\s0.\sThis\simplies\sthat\sTcl\sguarantees\sthat\sit\swill\snever\sstore\sa\svalue\sthat\sfits\sin\sa\s`double`\sor\s`Tcl_WideInt`\sas\sa\s`bigint`.\sIs\sthere\ssuch\sa\sguarantee?
J login apnadkarni
J mimetype text/x-markdown
K 8dd2807066d7cc4d8604164f39b7f0d65c0dc321
U apnadkarni
Z ac7ac62f8cfeddd96ba731cbc88c0b98