From ef5db57dc9793243f18bbc2d687fdad7a5b22f72 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 5 Oct 2008 19:22:22 +0000 Subject: Fix [Bug 2144595] --- ChangeLog | 5 +++++ generic/tclIndexObj.c | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index bd16f2b..f77711a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-05 Donal K. Fellows + + * generic/tclIndexObj.c (TclInitPrefixCmd): Make the [tcl::prefix] + into an exported command. [Bug 2144595] + 2008-10-04 Donal K. Fellows * generic/tclCmdIL.c (InfoFrameCmd): Improved hygiene of result diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 91b9e3d..1ca2d3e 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.43 2008/10/04 11:04:43 nijtmans Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.44 2008/10/05 19:22:22 dkf Exp $ */ #include "tclInt.h" @@ -520,13 +520,17 @@ TclInitPrefixCmd( Tcl_Interp *interp) /* Current interpreter. */ { static const EnsembleImplMap prefixImplMap[] = { - {"all", PrefixAllObjCmd, NULL}, - {"longest", PrefixLongestObjCmd, NULL}, - {"match", PrefixMatchObjCmd, NULL}, + {"all", PrefixAllObjCmd}, + {"longest", PrefixLongestObjCmd}, + {"match", PrefixMatchObjCmd}, {NULL} }; + Tcl_Command prefixCmd; - return TclMakeEnsemble(interp, "tcl::prefix", prefixImplMap); + prefixCmd = TclMakeEnsemble(interp, "::tcl::prefix", prefixImplMap); + Tcl_Export(interp, Tcl_FindNamespace(interp, "::tcl", NULL, 0), + "prefix", 0); + return prefixCmd; } /*---------------------------------------------------------------------- -- cgit v0.12