|
From: Alexandre F. <ale...@gm...> - 2008-01-17 15:52:36
|
On Jan 17, 2008 2:29 AM, Kevin Kenny <ke...@re...> wrote: > Alexandre Ferrieux asks about the code in GetBignumFromObj: > > Now I'm having a hard time understanding this: what if the string rep > > is not NULL (for example if the bignum has just been printed) ? It > > would seem that in this case, the object is reset to a pure string, > > namely that representing the bignum. While if it was NULL (for example > > just after a bignum computation), the string rep is empty. Why that > > dichotomy ? And why touch the ptrAndLong ? > > [...] There are quite a few cases where a bignum object is unshared, > and where we know that it will be dismissed as soon as we're done > with it. Yes, I can understand this. But why the strange manipulations on the string rep (with two very different outcomes depending on a "simple twist of fate" -- presence/absence of a string rep previously), if we know the object is just about to be freed by the Tcl_Obj scavenger, which takes care of all cases of presence/absence of string ant int rep ? -Alex |