diff options
Diffstat (limited to 'unix/dltest/pkgc.c')
| -rw-r--r-- | unix/dltest/pkgc.c | 33 | 
1 files changed, 19 insertions, 14 deletions
| diff --git a/unix/dltest/pkgc.c b/unix/dltest/pkgc.c index 484396e..557f21b 100644 --- a/unix/dltest/pkgc.c +++ b/unix/dltest/pkgc.c @@ -9,20 +9,27 @@   *   * See the file "license.terms" for information on usage and redistribution of   * this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: pkgc.c,v 1.9 2007/12/13 15:28:43 dgp Exp $   */ +#undef STATIC_BUILD  #include "tcl.h"  /* + * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the + * Pkgc_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    Pkgc_SubObjCmd(ClientData clientData, -		Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); +		Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);  static int    Pkgc_UnsafeObjCmd(ClientData clientData, -		Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); +		Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);  /*   *---------------------------------------------------------------------- @@ -46,7 +53,7 @@ Pkgc_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; @@ -84,7 +91,7 @@ Pkgc_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; @@ -107,7 +114,7 @@ Pkgc_UnsafeObjCmd(   *----------------------------------------------------------------------   */ -int +EXTERN int  Pkgc_Init(      Tcl_Interp *interp)		/* Interpreter in which the package is to be  				 * made available. */ @@ -121,10 +128,9 @@ Pkgc_Init(      if (code != TCL_OK) {  	return code;      } -    Tcl_CreateObjCommand(interp, "pkgc_sub", Pkgc_SubObjCmd, -	    (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); -    Tcl_CreateObjCommand(interp, "pkgc_unsafe", Pkgc_UnsafeObjCmd, -	    (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); +    Tcl_CreateObjCommand(interp, "pkgc_sub", Pkgc_SubObjCmd, NULL, NULL); +    Tcl_CreateObjCommand(interp, "pkgc_unsafe", Pkgc_UnsafeObjCmd, NULL, +	    NULL);      return TCL_OK;  } @@ -145,7 +151,7 @@ Pkgc_Init(   *----------------------------------------------------------------------   */ -int +EXTERN int  Pkgc_SafeInit(      Tcl_Interp *interp)		/* Interpreter in which the package is to be  				 * made available. */ @@ -159,7 +165,6 @@ Pkgc_SafeInit(      if (code != TCL_OK) {  	return code;      } -    Tcl_CreateObjCommand(interp, "pkgc_sub", Pkgc_SubObjCmd, (ClientData) 0, -	    (Tcl_CmdDeleteProc *) NULL); +    Tcl_CreateObjCommand(interp, "pkgc_sub", Pkgc_SubObjCmd, NULL, NULL);      return TCL_OK;  } | 
