Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1987 GetBooleanFromObj always gens string rep

obsolete: 8.4b2
closed-duplicate
miguel sofer
5
2002-08-07
2002-07-21
Don Porter
No

It appears that Tcl_GetBooleanFromObj always
calls SetBooleanFromAny which always
generates and reparses a string rep.

At the very least, a Tcl_Obj that is already
of tclBooleanType ought to just report its
internal rep. Seems it would be easy
to make more efficient conversions
from integer and internal types as well,
and leave the string processing for only
when it's really necessary.

Discussion

  • Logged In: YES
    user_id=79902

    Are all integer values (and in particular, all strings that
    interpret as integers) valid booleans?

     
  • miguel sofer
    miguel sofer
    2002-08-07

    • status: open --> closed-duplicate
     
  • miguel sofer
    miguel sofer
    2002-08-07

    Logged In: YES
    user_id=148712

    Duplicates [Bug 472576]