diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-01-06 10:20:54 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-01-06 10:20:54 (GMT) |
commit | a4a1ae8979a30624c2e3594cdf689a22146caca1 (patch) | |
tree | ed08f8806ff6b57df8a04685a0a443077a5098f7 /generic/tclOO.c | |
parent | 6fc7bc4022917dd2a594eb838f0b92903fca7061 (diff) | |
download | tcl-a4a1ae8979a30624c2e3594cdf689a22146caca1.zip tcl-a4a1ae8979a30624c2e3594cdf689a22146caca1.tar.gz tcl-a4a1ae8979a30624c2e3594cdf689a22146caca1.tar.bz2 |
Fix [Bug 2481109]
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; |