diff options
author | dgp <dgp@users.sourceforge.net> | 2012-12-07 14:53:40 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-12-07 14:53:40 (GMT) |
commit | 1aa76109883bcf6ea698357e30fb0957582cfecf (patch) | |
tree | 762b12e5cf7d0d72b2359e34f3a8588e8e21969a /unix/dltest | |
parent | 02929519bac8ca56b1a22346b912899e0e544702 (diff) | |
download | tcl-1aa76109883bcf6ea698357e30fb0957582cfecf.zip tcl-1aa76109883bcf6ea698357e30fb0957582cfecf.tar.gz tcl-1aa76109883bcf6ea698357e30fb0957582cfecf.tar.bz2 |
Extended test of [load]ing Tcl 8 compiled extension into Tcl 9 interp.
Diffstat (limited to 'unix/dltest')
-rw-r--r-- | unix/dltest/pkgb.c | 17 |
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; } |