Skip to content
Tcl Source Code View Ticket
Login

View Ticket

TIP 426 C API not implemented

Open0f3e1921c558aeb06aa9e7ff1f086383b6895a4eCreated 3 years agoUpdated 2 years ago
Descriptionmarkdown2024-05-19 06:34:09

Only logging this ticket in case this is an oversight and not intentional. TIP 426 as voted defines the public API's Tcl_RegisterCommandTypeName and Tcl_GetCommandTypeName.

I do not however find these functions defined in tcl.decls.

apnadkarni Ticket [0f3e1921c5]: 3 changes [History diff]2024-05-19 06:34:29
jan.nijtmanswiki2024-05-19 11:15:52

I don't think it's difficult to add those to the public API: Those functions are MODULE_SCOPE, and named `TclRegisterCommandTypeName`/`TclGetCommandTypeName`. But ... would any extension need those?

I think the answer to this question is `No`, so I would suggest to leave the implementation as-is. We can modify the TIP, mentioning this change-of-insight.

jan.nijtmanswiki2024-05-19 11:21:26

That said, I don't object to making this public (if there is an interest implementing the Tk-part, as mentioned in the TIP). In that case, I recommend only doing this for 9.0, not for 8.7.

apnadkarniplain2024-05-20 03:13:30
I do not have any particular need for the aforementioned functions so I am fine leaving things as they are. Only brought it up in case they were omitted as an oversight and not by intent.
apnadkarniplain2024-05-22 03:43:53
Donal, please close ticket if the functions in question were not exported by intent.
juliannoble2plain2025-01-18 14:48:42
I would like to see this as part of the public API to (hopefully) improve introspection in some mainstream packages.

for example the command created by 'sqlite3 dbcmd' is of type native - and I'd like to identify it as belonging to sqlite3 (for documentation & command completion) without the risk of calling unknown native commands that may have side effects. 

If this were public I'd be inclined to submit an RFE on the sqlite forum for adding a specific type such as sqlite3::dbcmd via this mechanism.

Presumably some guidance for package developers to avoid collisions via something like a prefix matching the package name would be nice too.(?)

I'd be interested also to hear if this may eventually be coming - or if there is perhaps some concern about collisions or type name proliferation?
Log in (anonymous is fine) to add a comment.