Overview
| Artifact ID: | e1d4640c9d710b1321ab6661081798b808cf2e17 |
|---|---|
| Ticket: | 520304ffffffffffffffffffffffffffffffffff
Tcl_GetIndexFromObjStruct signature |
| User & Date: | jenglish on 2002-02-20 02:56:44 |
Changes
- assignee changed to: "nijtmans"
- cmimetype changed to: "text/plain"
- comment changed to:
In the TIP27-ification of tclIndexObj.c, the third parameter of Tcl_GetIndexFromObjStruct() changed from a 'char **' to a 'CONST char **' (actually a CONST84 char **). In the actual use of the function though, the 'tablePtr' argument typically does not point (directly) to a 'char *' or a 'const char *', but rather to an array of some user-defined structure type (whose first member is a 'char *' or 'const char *'). So the most appropriate type is probably 'void *structTablePtr' (which should be cast to a 'char *' internally to do address arithmetic and to a 'CONST char **' to extract the string value, just like it does now.) This change would also make it easier to write extensions that compile against pre- and post-TIP27 versions of the core without resorting to #ifdefs or -DUSE_NON_CONST; inserting a cast to (void *) would suffice for pre-TIP27 versions.
- foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "jenglish"
- subsystem changed to: "13. Index Object"
- title changed to: "Tcl_GetIndexFromObjStruct signature"
- type changed to: "Bug"