Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-11-13
11:18 • Closed ticket [3553811fff]: New internal function: TclNewNamespaceObj plus 6... artifact: d0bf2ba6c0 user: serhiy.storchaka
2012-08-02
23:35 • New ticket [3553811fff]. artifact: 6153ef8778 user: dkf

New internal function: TclNewNamespaceObj

Closed / Fixed3553811fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 20 days ago
Descriptionplain2012-08-02 23:35:16
There are a few places through Tcl where the C API wants to return a namespace to the script level (as a fully-qualified name). Right now, we throw away that information and just return the string name. We also have a Tcl_ObjType for handling caching of namespace names, but it is currently only used on namesapce names that are being parsed. This should be optimizable, perhaps through a new function: Tcl_Obj *TclNewNamespaceObj(Tcl_Namespace *);

The first implementation could just create the name correctly as a string object. :-) But it should be possible to do better.
serhiy.storchakawiki2026-11-13 11:18:44

TclNewNamespaceObj was added in [56f880ad7b] (Tcl 9.0). It caches the resolved namespace in the new object and is used throughout the namespace, ensemble and TclOO code.

Log in (anonymous is fine) to add a comment.