diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-07 10:13:25 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-07 10:13:25 (GMT) |
commit | 12b6197382570a2802e97fd4534468e359289a22 (patch) | |
tree | 042361d7fda3027b137a5db23e56f312294df151 | |
parent | 2996ef1b03e4fac0c23ae64bb074521fc406cbef (diff) | |
parent | 925dea4994de1e572a6fc32a4645b2477ecbfa36 (diff) | |
download | tcl-12b6197382570a2802e97fd4534468e359289a22.zip tcl-12b6197382570a2802e97fd4534468e359289a22.tar.gz tcl-12b6197382570a2802e97fd4534468e359289a22.tar.bz2 |
merge novem
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclStubLib.c | 2 | ||||
-rw-r--r-- | unix/dltest/pkgb.c | 11 |
3 files changed, 12 insertions, 7 deletions
@@ -1,3 +1,9 @@ +2012-12-07 Jan Nijtmans <nijtmans@users.sf.net> + + * unix/dltest/pkgb.c: Turn pkgb.so into a Tcl8 interoperability test + library: Whatever Tcl9 looks like, loading pkgb.so in Tcl 8 should + either result in an error-message, either succeed, but never crash. + 2012-11-28 Donal K. Fellows <dkf@users.sf.net> * generic/tclZlib.c (ZlibStreamSubcmd): [Bug 3590483]: Use a mechanism diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 9a2e063..ba5864d 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -119,7 +119,7 @@ TclInitStubs( while (*p && (*p == *q)) { p++; q++; } - if (*p) { + if (*p || isDigit(*q)) { /* Construct error message */ Tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL); return NULL; diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c index 71b42e1..969401b 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; } @@ -149,10 +148,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; } |