summaryrefslogtreecommitdiffstats
path: root/unix/dltest
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-07 09:56:39 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-07 09:56:39 (GMT)
commit02929519bac8ca56b1a22346b912899e0e544702 (patch)
treeb1ea1ae54d127a824f85ada787f2b8e2257d91db /unix/dltest
parent22f216f3723933f0caf7b55272e86caf89ca52a6 (diff)
parent49e8fc13b06dffcfb81b653907f7350e56da0c49 (diff)
downloadtcl-02929519bac8ca56b1a22346b912899e0e544702.zip
tcl-02929519bac8ca56b1a22346b912899e0e544702.tar.gz
tcl-02929519bac8ca56b1a22346b912899e0e544702.tar.bz2
Turn pkgb.so into a Tcl9 interoperability test
library: Whatever Tcl9 looks like, loading pkgb.so in Tcl 9 should either result in an error-message, either succeed, but never crash.
Diffstat (limited to 'unix/dltest')
-rw-r--r--unix/dltest/pkgb.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c
index fe0d365..02bd233 100644
--- a/unix/dltest/pkgb.c
+++ b/unix/dltest/pkgb.c
@@ -93,8 +93,7 @@ Pkgb_UnsafeObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- Tcl_SetObjResult(interp, Tcl_NewStringObj("unsafe command invoked", -1));
- return TCL_OK;
+ return Tcl_EvalEx(interp, "list unsafe command invoked", -1, TCL_EVAL_GLOBAL);
}
/*
@@ -121,10 +120,10 @@ Pkgb_Init(
{
int code;
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-9.1", 0) == NULL) {
return TCL_ERROR;
}
- code = Tcl_PkgProvide(interp, "Pkgb", "2.3");
+ code = Tcl_PkgProvideEx(interp, "Pkgb", "2.3", NULL);
if (code != TCL_OK) {
return code;
}
@@ -158,10 +157,10 @@ Pkgb_SafeInit(
{
int code;
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-9.1", 0) == NULL) {
return TCL_ERROR;
}
- code = Tcl_PkgProvide(interp, "Pkgb", "2.3");
+ code = Tcl_PkgProvideEx(interp, "Pkgb", "2.3", NULL);
if (code != TCL_OK) {
return code;
}