summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-12-07 14:53:40 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-12-07 14:53:40 (GMT)
commit99bda89c0b6500e673ecacd280527492c780b562 (patch)
tree762b12e5cf7d0d72b2359e34f3a8588e8e21969a /unix
parent8c2dab88b5e6232496e646c1f31e6d6e0ab907ff (diff)
downloadtcl-99bda89c0b6500e673ecacd280527492c780b562.zip
tcl-99bda89c0b6500e673ecacd280527492c780b562.tar.gz
tcl-99bda89c0b6500e673ecacd280527492c780b562.tar.bz2
Extended test of [load]ing Tcl 8 compiled extension into Tcl 9 interp.
Diffstat (limited to 'unix')
-rw-r--r--unix/dltest/pkgb.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c
index 02bd233..9c199ca 100644
--- a/unix/dltest/pkgb.c
+++ b/unix/dltest/pkgb.c
@@ -30,6 +30,8 @@ static int Pkgb_SubObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
static int Pkgb_UnsafeObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
+static int Pkgb_DemoObjCmd(ClientData clientData,
+ Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
/*
*----------------------------------------------------------------------
@@ -95,6 +97,17 @@ Pkgb_UnsafeObjCmd(
{
return Tcl_EvalEx(interp, "list unsafe command invoked", -1, TCL_EVAL_GLOBAL);
}
+
+static int
+Pkgb_DemoObjCmd(
+ ClientData dummy, /* Not used. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *const objv[]) /* Argument objects. */
+{
+ const char *foo = Tcl_GetDefaultEncodingDir();
+ return TCL_OK;
+}
/*
*----------------------------------------------------------------------
@@ -128,8 +141,8 @@ Pkgb_Init(
return code;
}
Tcl_CreateObjCommand(interp, "pkgb_sub", Pkgb_SubObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "pkgb_unsafe", Pkgb_UnsafeObjCmd, NULL,
- NULL);
+ Tcl_CreateObjCommand(interp, "pkgb_unsafe", Pkgb_UnsafeObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand(interp, "pkgb_demo", Pkgb_DemoObjCmd, NULL, NULL);
return TCL_OK;
}