Tcl Source Code

Artifact [bf5b5a682a]
Login

Artifact bf5b5a682a14e0418ea5a42d3a0954b568d933da:

Attachment "sampleextension-monkey-business.patch" to ticket [941042ffff] added by jenglish 2004-04-24 05:52:35.
? patch
Index: generic/sample.h
===================================================================
RCS file: /cvsroot/tcl/sampleextension/generic/sample.h,v
retrieving revision 1.3
diff -u -r1.3 sample.h
--- generic/sample.h	8 Dec 2003 18:29:53 -0000	1.3
+++ generic/sample.h	23 Apr 2004 22:46:21 -0000
@@ -18,13 +18,15 @@
 #include <tcl.h>
 
 /*
- * Windows needs to know which symbols to export.  Unix does not.
- * BUILD_sample should be undefined for Unix.
+ * Windows needs to know which symbols to export.
+ * BUILD_sample should be defined when compiling the sample extension,
+ * undefined otherwise.
  */
 
 #ifdef BUILD_sample
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLEXPORT
+#define SAMPLE_STORAGE_CLASS DLLEXPORT
+#else
+#define SAMPLE_STORAGE_CLASS
 #endif /* BUILD_sample */
 
 #ifdef HAVE_INTTYPES_H
@@ -52,6 +54,6 @@
  * Only the _Init function is exported.
  */
 
-EXTERN int	Sample_Init(Tcl_Interp * interp);
+extern SAMPLE_STORAGE_CLASS int Sample_Init(Tcl_Interp * interp);
 
 #endif /* _SAMPLE */
Index: generic/tclsample.c
===================================================================
RCS file: /cvsroot/tcl/sampleextension/generic/tclsample.c,v
retrieving revision 1.4
diff -u -r1.4 tclsample.c
--- generic/tclsample.c	3 Dec 2003 08:15:27 -0000	1.4
+++ generic/tclsample.c	23 Apr 2004 22:46:21 -0000
@@ -321,7 +321,7 @@
  *----------------------------------------------------------------------
  */
 
-int
+int DLLEXPORT
 Sample_Init(Tcl_Interp *interp)
 {
     /*