diff options
Diffstat (limited to 'unix/dltest/pkgd.c')
-rw-r--r-- | unix/dltest/pkgd.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c index 6e114e9..3718dfb 100644 --- a/unix/dltest/pkgd.c +++ b/unix/dltest/pkgd.c @@ -11,18 +11,9 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#undef STATIC_BUILD #include "tcl.h" /* - * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the - * Pkgd_Init declaration is in the source file itself, which is only - * accessed when we are building a library. - */ -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLEXPORT - -/* * Prototypes for procedures defined later in this file: */ @@ -65,7 +56,7 @@ Pkgd_SubObjCmd( || (Tcl_GetIntFromObj(interp, objv[2], &second) != TCL_OK)) { return TCL_ERROR; } - Tcl_SetObjResult(interp, Tcl_NewIntObj(first - second)); + Tcl_SetObjResult(interp, Tcl_NewLongObj(first - second)); return TCL_OK; } @@ -114,17 +105,17 @@ Pkgd_UnsafeObjCmd( *---------------------------------------------------------------------- */ -EXTERN int +DLLEXPORT int Pkgd_Init( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ { int code; - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "9.0", 0) == NULL) { return TCL_ERROR; } - code = Tcl_PkgProvide(interp, "Pkgd", "7.3"); + code = Tcl_PkgProvideEx(interp, "Pkgd", "7.3", NULL); if (code != TCL_OK) { return code; } @@ -151,17 +142,17 @@ Pkgd_Init( *---------------------------------------------------------------------- */ -EXTERN int +DLLEXPORT int Pkgd_SafeInit( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ { int code; - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "9.0", 0) == NULL) { return TCL_ERROR; } - code = Tcl_PkgProvide(interp, "Pkgd", "7.3"); + code = Tcl_PkgProvideEx(interp, "Pkgd", "7.3", NULL); if (code != TCL_OK) { return code; } |