diff options
author | dkf <dkf@noemail.net> | 2009-01-06 10:20:53 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2009-01-06 10:20:53 (GMT) |
commit | f07e5df042ea4c336d9a41f7e7b157a6cd5976c0 (patch) | |
tree | ed08f8806ff6b57df8a04685a0a443077a5098f7 /generic/tclOO.c | |
parent | 18acb95aff22c8de4fb893e947538fbf5fef49f2 (diff) | |
download | tcl-f07e5df042ea4c336d9a41f7e7b157a6cd5976c0.zip tcl-f07e5df042ea4c336d9a41f7e7b157a6cd5976c0.tar.gz tcl-f07e5df042ea4c336d9a41f7e7b157a6cd5976c0.tar.bz2 |
Fix [Bug 2481109]
FossilOrigin-Name: dc504e5b79e61e315804f94c82f5c71590161bca
Diffstat (limited to 'generic/tclOO.c')
-rw-r--r-- | generic/tclOO.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclOO.c b/generic/tclOO.c index e161563..430e1cc 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.18 2008/10/31 22:08:32 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.19 2009/01/06 10:20:54 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1241,7 +1241,8 @@ Tcl_NewObjectInstance( * that's not allowed. */ - if (nameStr && Tcl_FindCommand(interp, nameStr, NULL, 0)) { + if (nameStr && Tcl_FindCommand(interp, nameStr, NULL, + TCL_NAMESPACE_ONLY)) { Tcl_AppendResult(interp, "can't create object \"", nameStr, "\": command already exists with that name", NULL); return NULL; @@ -1333,7 +1334,8 @@ TclNRNewObjectInstance( * that's not allowed. */ - if (nameStr && Tcl_FindCommand(interp, nameStr, NULL, 0)) { + if (nameStr && Tcl_FindCommand(interp, nameStr, NULL, + TCL_NAMESPACE_ONLY)) { Tcl_AppendResult(interp, "can't create object \"", nameStr, "\": command already exists with that name", NULL); return TCL_ERROR; |