Overview
| Artifact ID: | c70816c67fe76cf766041d1faa5e1e0a5f07d2a7 |
|---|---|
| Ticket: | 3304643fffffffffffffffffffffffffffffffff
User object info lost on more aggressive numeric conversion |
| User & Date: | dgp on 2011-06-30 03:20:07 |
Changes
- icomment:
My inclination is to say you are asking Tcl to do non-Tcl things. But perhaps with a more detailed example I might find some middle ground of accommodation. What's an example expression that illustrates the problem? More examples and less description generally would be a better way for more people to understand the details of your troubles and either find a Tcl change to make you happy, or suggest changes to your code with the maximum pracitcality. When you create your own Tcl_ObjTypes, part of the contract with Tcl is that it can "re-type" values as it sees fit. It will not change the value (assuming proper copy on write by everyone), but it might change the type. The robust supported way to deal with that is for your Tcl_ObjType to supply a Tcl_SetFromAnyProc() that can take any Tcl string value and generate the corresponding internal rep your Tcl_ObjType uses. That implies either encoding into the string rep all that needed to reconstruct your intrep, or using some kind of handle scheme with an auxilliary lookup (for example a hash table). That said, people have made other less robust schemes work, so please give a few examples so I can take a look at the details to see what solutions might be feasible.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"