diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-21 08:36:38 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-21 08:36:38 (GMT) |
commit | cd8d5b5a18221b00c35aa76c901a50d7fa45bef8 (patch) | |
tree | 42228049596798c62dd1b915c86720bd7bd11f4c /unix/dltest/pkgb.c | |
parent | f0de1fd27c3a2f0e88e89b4ce85ec9a0c72508f6 (diff) | |
parent | b59e26b4ebf4d75131241be768955f8ae29e498f (diff) | |
download | tcl-cd8d5b5a18221b00c35aa76c901a50d7fa45bef8.zip tcl-cd8d5b5a18221b00c35aa76c901a50d7fa45bef8.tar.gz tcl-cd8d5b5a18221b00c35aa76c901a50d7fa45bef8.tar.bz2 |
Make pkgb.so loadable in Tcl 8.4 as well.
Eliminate unnessarcy static HasStubSupport() and isDigit() functions, just do the same inline.
Diffstat (limited to 'unix/dltest/pkgb.c')
-rw-r--r-- | unix/dltest/pkgb.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c index 489f66b..3338eb5 100644 --- a/unix/dltest/pkgb.c +++ b/unix/dltest/pkgb.c @@ -104,15 +104,18 @@ Pkgb_UnsafeObjCmd( *---------------------------------------------------------------------- */ -int +DLLEXPORT int Pkgb_Init( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ { int code; - if (Tcl_InitStubs(interp, "8.5-9.1", 0) == NULL) { - return TCL_ERROR; + if (Tcl_InitStubs(interp, "8.4", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.4-", 0) == NULL) { + return TCL_ERROR; + } + Tcl_ResetResult(interp); } code = Tcl_PkgProvideEx(interp, "Pkgb", "2.3", NULL); if (code != TCL_OK) { @@ -142,15 +145,18 @@ Pkgb_Init( *---------------------------------------------------------------------- */ -int +DLLEXPORT int Pkgb_SafeInit( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ { int code; - if (Tcl_InitStubs(interp, "8.5-9.1", 0) == NULL) { - return TCL_ERROR; + if (Tcl_InitStubs(interp, "8.4", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.4-", 0) == NULL) { + return TCL_ERROR; + } + Tcl_ResetResult(interp); } code = Tcl_PkgProvideEx(interp, "Pkgb", "2.3", NULL); if (code != TCL_OK) { |