Overview
| Artifact ID: | 0dec760c03e386dc29b8ae662fc6a5ab7df8a435 |
|---|---|
| Ticket: | 1917650fffffffffffffffffffffffffffffffff
Tcl_ConvertToType(, , doubleType) incompatibility |
| User & Date: | das on 2008-06-17 07:32:27 |
Changes
- icomment:
Logged In: YES user_id=90580 Originator: NO Alexandre, this subject has a long history, AFAIK the behaviour changes w.r.t numberic types was a completely intentional part of TIP #249: > First, as mentioned above, C extensions will no longer have fine control > over Tcl's built-in numeric types, because the types will not be > registered and hence will be unavailable for use with Tcl_ConvertToType. > This is actually a good thing, since it means that the rest of Tcl can > assume that they are well-behaved, resulting in a considerable > simplification. Most of the Tcl Core Team believes that > Tcl_ConvertToType has no legitimate use in any case. > Second, it will no longer be correct to assume that Tcl_Get*FromObj will > leave an internal representation of precisely the requested type. It is, > in any case, a highly questionable practice for callers to assume a > specific internal representation (with the possible exception of > Tcl_Set*Obj and Tcl_New*Obj). There will no doubt be a few extensions > that run afoul of this change, but they can be fixed easily in such a > way that they will continue to compile and run on earlier versions of > Tcl. the original intent of the TIP to have the numberic ObjTypes unregistered was relaxed because of backwards compatibility problems with extensions that did not expect a NULL result from Tcl_GetObjType() (for instance I ran into this with Ffidl). Most of this is documented in the ChangeLog, and was also discussed several times on tcl-core I think. Kevin might be the best person to ask for further details. There is a definitely doc bug for Tcl_ConvertToType here but probably nothing more...
- login: "das"
- mimetype: "text/plain"
- username: "das"