summaryrefslogtreecommitdiffstats
path: root/unix/dltest/pkgua.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/dltest/pkgua.c')
-rw-r--r--unix/dltest/pkgua.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c
index 417bedb..9d5a9d9 100644
--- a/unix/dltest/pkgua.c
+++ b/unix/dltest/pkgua.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
- * Pkgua_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:
*/
@@ -78,7 +69,7 @@ PkguaInterpToTokens(
int newEntry;
Tcl_Command *cmdTokens;
Tcl_HashEntry *entryPtr =
- Tcl_CreateHashEntry(&interpTokenMap, (char *) interp, &newEntry);
+ Tcl_CreateHashEntry(&interpTokenMap, interp, &newEntry);
if (newEntry) {
cmdTokens = (Tcl_Command *)
@@ -98,7 +89,7 @@ PkguaDeleteTokens(
Tcl_Interp *interp)
{
Tcl_HashEntry *entryPtr =
- Tcl_FindHashEntry(&interpTokenMap, (char *) interp);
+ Tcl_FindHashEntry(&interpTokenMap, interp);
if (entryPtr) {
Tcl_Free((char *) Tcl_GetHashValue(entryPtr));
@@ -200,7 +191,7 @@ PkguaQuoteObjCmd(
*----------------------------------------------------------------------
*/
-EXTERN int
+DLLEXPORT int
Pkgua_Init(
Tcl_Interp *interp) /* Interpreter in which the package is to be
* made available. */
@@ -208,7 +199,7 @@ Pkgua_Init(
int code, cmdIndex = 0;
Tcl_Command *cmdTokens;
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
@@ -224,7 +215,7 @@ Pkgua_Init(
return code;
}
- Tcl_SetVar(interp, "::pkgua_loaded", ".", TCL_APPEND_VALUE);
+ Tcl_SetVar2(interp, "::pkgua_loaded", NULL, ".", TCL_APPEND_VALUE);
cmdTokens = PkguaInterpToTokens(interp);
cmdTokens[cmdIndex++] =
@@ -253,7 +244,7 @@ Pkgua_Init(
*----------------------------------------------------------------------
*/
-EXTERN int
+DLLEXPORT int
Pkgua_SafeInit(
Tcl_Interp *interp) /* Interpreter in which the package is to be
* made available. */
@@ -278,7 +269,7 @@ Pkgua_SafeInit(
*----------------------------------------------------------------------
*/
-EXTERN int
+DLLEXPORT int
Pkgua_Unload(
Tcl_Interp *interp, /* Interpreter from which the package is to be
* unloaded. */
@@ -299,7 +290,7 @@ Pkgua_Unload(
PkguaDeleteTokens(interp);
- Tcl_SetVar(interp, "::pkgua_detached", ".", TCL_APPEND_VALUE);
+ Tcl_SetVar2(interp, "::pkgua_detached", NULL, ".", TCL_APPEND_VALUE);
if (flags == TCL_UNLOAD_DETACH_FROM_PROCESS) {
/*
@@ -309,7 +300,7 @@ Pkgua_Unload(
*/
PkguaFreeTokensHashTable();
- Tcl_SetVar(interp, "::pkgua_unloaded", ".", TCL_APPEND_VALUE);
+ Tcl_SetVar2(interp, "::pkgua_unloaded", NULL, ".", TCL_APPEND_VALUE);
}
return TCL_OK;
}
@@ -331,7 +322,7 @@ Pkgua_Unload(
*----------------------------------------------------------------------
*/
-EXTERN int
+DLLEXPORT int
Pkgua_SafeUnload(
Tcl_Interp *interp, /* Interpreter from which the package is to be
* unloaded. */