Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-04
13:21 • Ticket [217863ffff] Tcl_SetVar2Ex() does not create new namespace (bad docs)... artifact: f4a3a20c55 user: dgp
2000-10-26
07:59 • Closed ticket [217863ffff]. artifact: 2851436419 user: welch
00:45 • New ticket [217863ffff]. artifact: 958f9ebbe8 user: nobody

Tcl_SetVar2Ex() does not create new namespace (bad docs)

Closed / Invalid217863ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:45:04
OriginalBugID: 2057 Bug
Version: 8.1
SubmitDate: '1999-05-13'
LastModified: '2000-04-27'
Severity: MED
Status: Closed
Submitter: pat
ChangedBy: ericm
RelatedBugIDs: 4836
OS: Solaris
OSVersion: 2.5.1
Machine: Other
FixedDate: '2000-10-25'
ClosedDate: '2000-04-27'


Name:
Byron Servies

ReproducibleScript:
Tcl_Obj *obj_p;
    obj_p = Tcl_NewIntObj(1);
    (void) Tcl_SetVar2Ex(interp, "gst::testvar", NULL, obj_p,
    TCL_LEAVE_ERR_MSG | TCL_NAMESPACE_ONLY);

ObservedBehavior:
Tcl_CreateObjCommand will create a namespace if one doesn't exist, but
    the SetVar commands do not.  Since there does not appear to be a
    documented C API for creating namespaces myself, I am unsure what to do.
     It does appear I can append the CREATE_NS_IF_UNKNOWN flag to the call,
    but that behavior isn't documented; just what I found in
    CreateObjCommand...

DesiredBehavior:
SetVar should create namespaces if they don't exist.  A better
    explaination of how to use the namespace facility from C would help as
    well.



There exist a Tcl_(Create|Find)Namespace, which is what one should
really use.  These are public APIs that unfortunately lack docs at
the moment. 
-- 09/15/1999 hobbs

This bug is superceeded by 4836.

- eric
 
-- 04/27/2000 ericm
welch Closed ticket [217863ffff]. [History diff]2000-10-26 07:59:48
dgp Ticket [217863ffff]: 3 changes [History diff]2001-04-04 13:21:27
Log in (anonymous is fine) to add a comment.