diff options
| author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-12-07 09:53:58 (GMT) |
|---|---|---|
| committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-12-07 09:53:58 (GMT) |
| commit | 7d58e500c40438a06e38fba1612f13b761a7369b (patch) | |
| tree | 25688501a5ddb1a00019362bb425f19d818db2aa | |
| parent | 931f5d016b7099cfdcda8202177593e108078499 (diff) | |
| parent | d0e69bf89297c009615894a3120c96e9427fab50 (diff) | |
| download | tcl-7d58e500c40438a06e38fba1612f13b761a7369b.zip tcl-7d58e500c40438a06e38fba1612f13b761a7369b.tar.gz tcl-7d58e500c40438a06e38fba1612f13b761a7369b.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.
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | unix/dltest/pkgb.c | 11 |
2 files changed, 11 insertions, 6 deletions
@@ -1,3 +1,9 @@ +2012-12-07 Jan Nijtmans <nijtmans@users.sf.net> + + * unix/dltest/pkgb.c: 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. + 2012-11-14 Donal K. Fellows <dkf@users.sf.net> * unix/tclUnixPipe.c (DefaultTempDir): [Bug 2933003]: Allow overriding diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c index 51c1bd9..489f66b 100644 --- a/unix/dltest/pkgb.c +++ b/unix/dltest/pkgb.c @@ -84,8 +84,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); } /* @@ -112,10 +111,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; } @@ -150,10 +149,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; } |
