summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-21 08:36:38 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-21 08:36:38 (GMT)
commitebbf7144d21b18662810219f1e2ce440125a7444 (patch)
tree42228049596798c62dd1b915c86720bd7bd11f4c /unix
parent989c5bb9a47e868bc77b1664f487bcee7fb90b62 (diff)
parentfac8f9d0ae0b5845ac81ae09a4cbec06964ec2a4 (diff)
downloadtcl-ebbf7144d21b18662810219f1e2ce440125a7444.zip
tcl-ebbf7144d21b18662810219f1e2ce440125a7444.tar.gz
tcl-ebbf7144d21b18662810219f1e2ce440125a7444.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')
-rw-r--r--unix/dltest/pkgb.c18
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) {