diff options
Diffstat (limited to 'unix/dltest/pkgb.c')
-rw-r--r-- | unix/dltest/pkgb.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c index 51c1bd9..fe0d365 100644 --- a/unix/dltest/pkgb.c +++ b/unix/dltest/pkgb.c @@ -11,16 +11,25 @@ * 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 + * Pkgb_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: */ static int Pkgb_SubObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int Pkgb_UnsafeObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* *---------------------------------------------------------------------- @@ -44,7 +53,7 @@ Pkgb_SubObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int first, second; @@ -82,7 +91,7 @@ Pkgb_UnsafeObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_SetObjResult(interp, Tcl_NewStringObj("unsafe command invoked", -1)); return TCL_OK; @@ -105,7 +114,7 @@ Pkgb_UnsafeObjCmd( *---------------------------------------------------------------------- */ -int +EXTERN int Pkgb_Init( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ @@ -119,10 +128,9 @@ Pkgb_Init( if (code != TCL_OK) { return code; } - Tcl_CreateObjCommand(interp, "pkgb_sub", Pkgb_SubObjCmd, - (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateObjCommand(interp, "pkgb_unsafe", Pkgb_UnsafeObjCmd, - (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateObjCommand(interp, "pkgb_sub", Pkgb_SubObjCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "pkgb_unsafe", Pkgb_UnsafeObjCmd, NULL, + NULL); return TCL_OK; } @@ -143,7 +151,7 @@ Pkgb_Init( *---------------------------------------------------------------------- */ -int +EXTERN int Pkgb_SafeInit( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ @@ -157,7 +165,6 @@ Pkgb_SafeInit( if (code != TCL_OK) { return code; } - Tcl_CreateObjCommand(interp, "pkgb_sub", Pkgb_SubObjCmd, (ClientData) 0, - (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateObjCommand(interp, "pkgb_sub", Pkgb_SubObjCmd, NULL, NULL); return TCL_OK; } |