Skip to content
Tcl Source Code Artifact [5733eb7f9a]
Login

Artifact [5733eb7f9a]

Artifact 5733eb7f9a59613c70a4fdc40957787a4df6720e:

Attachment "tcl-stublib.patch" to ticket [1091431fff] added by jenglish on 2004-12-27 03:37:10.
Date: Sun Dec 26 12:31:58 PM PST 2004
Files: generic/tclStubLib.c

--- generic/tclStubLib.c.stublib.old	2004-12-26 12:10:27.650640241 -0800
+++ generic/tclStubLib.c	2004-12-26 12:31:56.219933653 -0800
@@ -86,8 +86,7 @@
     int exact;
 {
     CONST char *actualVersion = NULL;
-    TclStubs *tmp;
-    TclStubs **tmpp;
+    ClientData *pkgData = NULL;
 
     /*
      * We can't optimize this check by caching tclStubsPtr because
@@ -100,14 +99,12 @@
 	return NULL;
     }
 
-    /* This is needed to satisfy GCC 3.3's strict aliasing rules */
-    tmpp = &tmp;
     actualVersion = Tcl_PkgRequireEx(interp, "Tcl", version, exact,
-	    (ClientData *) tmpp);
+	    (ClientData*)&pkgData);
     if (actualVersion == NULL) {
-	tclStubsPtr = NULL;
 	return NULL;
     }
+    tclStubsPtr = (TclStubs*)pkgData;
 
     if (tclStubsPtr->hooks) {
 	tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;