diff options
author | nijtmans <nijtmans> | 2010-06-09 13:51:51 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-06-09 13:51:51 (GMT) |
commit | 47d68f982cf946a1cab3f9e7c45be564f63a9471 (patch) | |
tree | f56f282743fca4dedfd8694cbd5eb4409c8cf161 /tools/tsdPerf.c | |
parent | 448358d7c20e186a62a2abcb7f32cc112205d142 (diff) | |
download | tcl-47d68f982cf946a1cab3f9e7c45be564f63a9471.zip tcl-47d68f982cf946a1cab3f9e7c45be564f63a9471.tar.gz tcl-47d68f982cf946a1cab3f9e7c45be564f63a9471.tar.bz2 |
tsdPerf.c: Fix export of symbol Tsdperf_Init, when
using -fvisibility=hidden. Make two functions static,
eliminate some unnecessary type casts.
configure(.in)?: Update to Tcl 8.6
Diffstat (limited to 'tools/tsdPerf.c')
-rw-r--r-- | tools/tsdPerf.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/tools/tsdPerf.c b/tools/tsdPerf.c index 9399b3b..40004b1 100644 --- a/tools/tsdPerf.c +++ b/tools/tsdPerf.c @@ -1,5 +1,7 @@ #include <tcl.h> +extern DLLEXPORT Tcl_PackageInitProc Tsdperf_Init; + static Tcl_ThreadDataKey key; typedef struct { @@ -7,7 +9,7 @@ typedef struct { } TsdPerf; -int +static int tsdPerfSetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { TsdPerf *perf = Tcl_GetThreadData(&key, sizeof(TsdPerf)); int i; @@ -26,7 +28,8 @@ tsdPerfSetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const return TCL_OK; } -int tsdPerfGetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { +static int +tsdPerfGetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { TsdPerf *perf = Tcl_GetThreadData(&key, sizeof(TsdPerf)); @@ -35,19 +38,14 @@ int tsdPerfGetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *co return TCL_OK; } - int -Tsdperf_Init (Tcl_Interp *interp) { - if (NULL == Tcl_InitStubs(interp, TCL_VERSION, 0)) { +Tsdperf_Init(Tcl_Interp *interp) { + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { return TCL_ERROR; } - - Tcl_CreateObjCommand(interp, "tsdPerfSet", tsdPerfSetObjCmd, (ClientData)NULL, - (Tcl_CmdDeleteProc *)NULL); - Tcl_CreateObjCommand(interp, "tsdPerfGet", tsdPerfGetObjCmd, (ClientData)NULL, - (Tcl_CmdDeleteProc *)NULL); - + Tcl_CreateObjCommand(interp, "tsdPerfSet", tsdPerfSetObjCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "tsdPerfGet", tsdPerfGetObjCmd, NULL, NULL); return TCL_OK; } |