#630 New internal function: TclNewNamespaceObj

open
miguel sofer
5
2012-08-02
2012-08-02
Donal K. Fellows
No

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.

Discussion