summaryrefslogtreecommitdiffstats
path: root/unix/dltest/pkgd.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/dltest/pkgd.c')
-rw-r--r--unix/dltest/pkgd.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c
index 46f159a..211902c 100644
--- a/unix/dltest/pkgd.c
+++ b/unix/dltest/pkgd.c
@@ -10,12 +10,20 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: pkgd.c,v 1.9 2008/04/27 22:41:47 dkf Exp $
+ * RCS: @(#) $Id: pkgd.c,v 1.10 2010/02/22 23:31:42 nijtmans Exp $
*/
#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:
*/
@@ -107,7 +115,7 @@ Pkgd_UnsafeObjCmd(
*----------------------------------------------------------------------
*/
-int
+EXTERN int
Pkgd_Init(
Tcl_Interp *interp) /* Interpreter in which the package is to be
* made available. */
@@ -121,10 +129,9 @@ Pkgd_Init(
if (code != TCL_OK) {
return code;
}
- Tcl_CreateObjCommand(interp, "pkgd_sub", Pkgd_SubObjCmd,
- (ClientData) 0, (Tcl_CmdDeleteProc *) NULL);
- Tcl_CreateObjCommand(interp, "pkgd_unsafe", Pkgd_UnsafeObjCmd,
- (ClientData) 0, (Tcl_CmdDeleteProc *) NULL);
+ Tcl_CreateObjCommand(interp, "pkgd_sub", Pkgd_SubObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand(interp, "pkgd_unsafe", Pkgd_UnsafeObjCmd, NULL,
+ NULL);
return TCL_OK;
}
@@ -145,7 +152,7 @@ Pkgd_Init(
*----------------------------------------------------------------------
*/
-int
+EXTERN int
Pkgd_SafeInit(
Tcl_Interp *interp) /* Interpreter in which the package is to be
* made available. */
@@ -159,7 +166,6 @@ Pkgd_SafeInit(
if (code != TCL_OK) {
return code;
}
- Tcl_CreateObjCommand(interp, "pkgd_sub", Pkgd_SubObjCmd, (ClientData) 0,
- (Tcl_CmdDeleteProc *) NULL);
+ Tcl_CreateObjCommand(interp, "pkgd_sub", Pkgd_SubObjCmd, NULL, NULL);
return TCL_OK;
}