summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2016-06-16 17:55:05 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2016-06-16 17:55:05 (GMT)
commite2b6630b6576456e6b45fd7bcead62af16e04a8c (patch)
tree9eb3f72ceca001a9ff1c72ec21e2e7d3009199f3
parentb6c963d325c3498fafa6484219a0fae7784b2264 (diff)
downloadblt-e2b6630b6576456e6b45fd7bcead62af16e04a8c.zip
blt-e2b6630b6576456e6b45fd7bcead62af16e04a8c.tar.gz
blt-e2b6630b6576456e6b45fd7bcead62af16e04a8c.tar.bz2
minor changes
-rw-r--r--src/tkbltStubLib.C16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/tkbltStubLib.C b/src/tkbltStubLib.C
index b4180f3..e973063 100644
--- a/src/tkbltStubLib.C
+++ b/src/tkbltStubLib.C
@@ -4,18 +4,12 @@
#include <tcl.h>
-void *tkbltStubsPtr;
+ClientData tkbltStubsPtr =NULL;
-CONST char *
-Tkblt_InitStubs(Tcl_Interp *interp, CONST char *version, int exact)
+const char* Tkblt_InitStubs(Tcl_Interp* interp, const char* version, int exact)
{
- CONST char *result;
+ const char* actualVersion =
+ Tcl_PkgRequireEx(interp, "tkblt", version, exact, &tkbltStubsPtr);
- result = Tcl_PkgRequireEx(interp, "tkblt", version, exact,
- (ClientData *) &tkbltStubsPtr);
- if (!result || !tkbltStubsPtr) {
- return (char *) NULL;
- }
-
- return result;
+ return (actualVersion && tkbltStubsPtr) ? actualVersion : NULL;
}