summaryrefslogtreecommitdiffstats
path: root/generic/tclOO.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-01-06 10:20:54 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-01-06 10:20:54 (GMT)
commita4a1ae8979a30624c2e3594cdf689a22146caca1 (patch)
treeed08f8806ff6b57df8a04685a0a443077a5098f7 /generic/tclOO.c
parent6fc7bc4022917dd2a594eb838f0b92903fca7061 (diff)
downloadtcl-a4a1ae8979a30624c2e3594cdf689a22146caca1.zip
tcl-a4a1ae8979a30624c2e3594cdf689a22146caca1.tar.gz
tcl-a4a1ae8979a30624c2e3594cdf689a22146caca1.tar.bz2
Fix [Bug 2481109]
Diffstat (limited to 'generic/tclOO.c')
-rw-r--r--generic/tclOO.c8
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;