Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Please use 'const char*' in Tcl_CreateCommand

Closed / Fixed217904ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 25 years ago
Descriptionplain2000-10-26 00:45:42
OriginalBugID: 2580 RFE
Version: 8.0.5
SubmitDate: '1999-08-18'
LastModified: '2000-05-17'
Severity: MED
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 1162
OS: Solaris
OSVersion: Solaris 2.7 (
Machine: Other
FixedDate: '2000-10-25'
ClosedDate: '2000-05-17'


Name:
Charles P. Peterson

Comments:
I looked at your latest beta, and you still haven't done this.

DesiredBehavior:
String constant "const"-ness is now required by ANSI/ISO C++ and
    compilers such
    as Sun's latest SUNPRO C++ 5.0 are starting to enforce this rule.
    
    Please declare all unmodified string arguments as "const char*" (which
    is valid in both C++ and ANSI C).  As it currently stands, I have to
    cheat with casts to work around this when calling (for example)
    Tcl_CreateCommand from C++.
    
    (Note: when you start doing this be prepared to do it all at once or
    suffer from
    "const poisoning.")
welch Open ticket [217904ffff]. [History diff]2000-10-26 08:09:12
kennykbplain2001-02-15 00:24:17
This bug substantially duplicates bug ID# 119151, which I'd enter in the 'dependent' field if SF would let me.
dgp Closed ticket [217904ffff]. [History diff]2001-02-15 03:12:28
dgp Ticket [217904ffff]: 4 changes [History diff]2001-04-05 06:55:07
kennykbplain2001-04-05 22:09:05
Logged In: YES 
user_id=99768

This bug is requesting the CONST specifically in Tcl_CreateCommand; this API still hasn't been
updated in the current HEAD.  I'm reopening it so we don't forget to fix it.
dgp Ticket [217904ffff]: 1 change [History diff]2001-04-06 02:00:45
dgp Ticket [217904ffff]: 1 change [History diff]2001-04-06 02:01:27
hobbsplain2001-09-06 05:40:13
Logged In: YES 
user_id=72656

The 8.4 Tcl_CreateCommand has the cmdName CONST'ed, along 
with the general constification of 8.4.
Log in (anonymous is fine) to add a comment.