summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjoye <joye>2014-04-24 17:22:18 (GMT)
committerjoye <joye>2014-04-24 17:22:18 (GMT)
commitd295622d7d281348dda27d2bd6bda7e6b45db273 (patch)
treeeaeec6f2f4e65c4f2fb53eef7153c6fb39abd8a4 /src
parent0014e6665f1d4bd3c4d7f5785169a433fec5d183 (diff)
downloadblt-d295622d7d281348dda27d2bd6bda7e6b45db273.zip
blt-d295622d7d281348dda27d2bd6bda7e6b45db273.tar.gz
blt-d295622d7d281348dda27d2bd6bda7e6b45db273.tar.bz2
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/bltVector.C23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/bltVector.C b/src/bltVector.C
index 89b482e..10387d8 100644
--- a/src/bltVector.C
+++ b/src/bltVector.C
@@ -50,7 +50,7 @@
#include <stdlib.h>
#include <ctype.h>
-#include "bltInt.h"
+//#include "bltInt.h"
#include "bltVecInt.h"
#include "bltNsUtil.h"
#include "bltSwitch.h"
@@ -1834,10 +1834,23 @@ Blt_Vec_GetInterpData(Tcl_Interp* interp)
int
Blt_VectorCmdInitProc(Tcl_Interp* interp)
{
- static Blt_InitCmdSpec cmdSpec = {"vector", VectorCmd, };
-
- cmdSpec.clientData = Blt_Vec_GetInterpData(interp);
- return Blt_InitCmd(interp, "::blt", &cmdSpec);
+ Tcl_Namespace* nsPtr;
+ Tcl_Command cmdToken;
+ const char* cmdPath = "::blt::vector";
+
+ nsPtr = Tcl_FindNamespace(interp, "::blt", NULL, TCL_LEAVE_ERR_MSG);
+ if (nsPtr == NULL)
+ return TCL_ERROR;
+
+ cmdToken = Tcl_FindCommand(interp, cmdPath, NULL, 0);
+ if (cmdToken)
+ return TCL_OK;
+ cmdToken = Tcl_CreateObjCommand(interp, cmdPath, VectorCmd,
+ Blt_Vec_GetInterpData(interp), NULL);
+ if (Tcl_Export(interp, nsPtr, "vector", 0) != TCL_OK)
+ return TCL_ERROR;
+
+ return TCL_OK;
}
/* C Application interface to vectors */