You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is unreachable (assuming tclBooleanTypePtr != NULL). It also does not make sense for the statement to be using objPtr->internalRep because it is invalid when objPtr->typePtr == NULL.
I am still trying to understand how this code is intended to work. I may propose changes to it anyway in #42 due to various other issues in SvFromTclObj() which I encounter in Tcl 9.0.
The text was updated successfully, but these errors were encountered:
I am not sure I will ever figure out what the original intention was…
At this point, I would be inclined to only ever return 0 or 1 even for “string” booleans. I don’t see how returning them as strings in Perl is useful, as I imagine doing so would only needlessly complicate things for users; why make the user check for "true"/"false"/"yes"/"no"/"on"/"off" when Tcl_GetBooleanFromObj() can do so for them?
Compare to how Tkinter converts any value Tcl says is already boolean (including string booleans) to a Python boolean—False or True.
In this code which appeared in 323f8e1:
tcl.pm/Tcl.xs
Lines 566 to 579 in 4067e75
The statement
is unreachable (assuming
tclBooleanTypePtr != NULL
). It also does not make sense for the statement to be usingobjPtr->internalRep
because it is invalid whenobjPtr->typePtr == NULL
.I am still trying to understand how this code is intended to work. I may propose changes to it anyway in #42 due to various other issues in
SvFromTclObj()
which I encounter in Tcl 9.0.The text was updated successfully, but these errors were encountered: