You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-cvs@tcl.apache.org by ro...@apache.org on 2009/07/14 21:11:04 UTC

svn commit: r794020 - in /tcl/websh/trunk: CHANGES src/ChangeLog src/generic/interpool.c src/generic/tclAppInit.c src/generic/web.c src/generic/web.h

Author: ronnie
Date: Tue Jul 14 19:11:04 2009
New Revision: 794020

URL: http://svn.apache.org/viewvc?rev=794020&view=rev
Log:
- Improved/streamlined Tcl_InitStubs handling

Modified:
    tcl/websh/trunk/CHANGES
    tcl/websh/trunk/src/ChangeLog
    tcl/websh/trunk/src/generic/interpool.c
    tcl/websh/trunk/src/generic/tclAppInit.c
    tcl/websh/trunk/src/generic/web.c
    tcl/websh/trunk/src/generic/web.h

Modified: tcl/websh/trunk/CHANGES
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/CHANGES?rev=794020&r1=794019&r2=794020&view=diff
==============================================================================
--- tcl/websh/trunk/CHANGES (original)
+++ tcl/websh/trunk/CHANGES Tue Jul 14 19:11:04 2009
@@ -9,6 +9,8 @@
 Trunk
 -----
 
+- Improved/streamlined Tcl_InitStubs handling
+
 - Added [web::config safelog] configuration to allow web::log to properly
   throw errors if I/O fails (if safelog is set to 0). Default is 1 to ensure
   backward compatibility.

Modified: tcl/websh/trunk/src/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/ChangeLog?rev=794020&r1=794019&r2=794020&view=diff
==============================================================================
--- tcl/websh/trunk/src/ChangeLog (original)
+++ tcl/websh/trunk/src/ChangeLog Tue Jul 14 19:11:04 2009
@@ -1,3 +1,12 @@
+2009-07-14 Brunner Ronnie <ro...@netcetera.ch>
+	* src/generic/tclAppInit.c, src/generic/interpool.c:
+	- Always call Tcl_InitStubs and consistently use "8.2" as version
+	* src/generic/interpool.c:
+	- Call new ModWebsh_Init to properly load libwebsh.so
+	* src/generic/web.c, src/generic/web.h:
+	- Added ModWebsh_Init to initialize libwebsh.so for mainInterp 
+	  in mod_websh
+	
 2009-06-26 Brunner Ronnie <ro...@netcetera.ch>
 	* doc/quickref.xml:
 	- Added documentation of [web::config] mod_websh subcommands

Modified: tcl/websh/trunk/src/generic/interpool.c
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/generic/interpool.c?rev=794020&r1=794019&r2=794020&view=diff
==============================================================================
--- tcl/websh/trunk/src/generic/interpool.c (original)
+++ tcl/websh/trunk/src/generic/interpool.c Tue Jul 14 19:11:04 2009
@@ -606,19 +606,17 @@
     if (mainInterp == NULL)
 	return NULL;
 
+    if (Tcl_InitStubs(mainInterp,"8.2",0) == NULL) {
+      Tcl_DeleteInterp(mainInterp);
+      return NULL;
+    }
+
     /* just to be sure the memory command is imported if 
        the corresponding Tcl features it */
 #ifdef TCL_MEM_DEBUG
     Tcl_InitMemory(mainInterp);
 #endif
 
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(mainInterp,"8.2.0",0) == NULL) {
-	Tcl_DeleteInterp(mainInterp);
-	return NULL;
-    }
-#endif
-
     apFuncs = createApFuncs();
     if (apFuncs == NULL) {
         Tcl_DeleteInterp(mainInterp);
@@ -632,8 +630,8 @@
 	return NULL;
     }
 
-    /* register Log Module in here */
-    if (log_Init(mainInterp) == TCL_ERROR) {
+    /* Websh Library Init */
+    if (ModWebsh_Init(mainInterp) == TCL_ERROR) {
 	Tcl_DeleteInterp(mainInterp);
 	return NULL;
     }

Modified: tcl/websh/trunk/src/generic/tclAppInit.c
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/generic/tclAppInit.c?rev=794020&r1=794019&r2=794020&view=diff
==============================================================================
--- tcl/websh/trunk/src/generic/tclAppInit.c (original)
+++ tcl/websh/trunk/src/generic/tclAppInit.c Tue Jul 14 19:11:04 2009
@@ -126,11 +126,9 @@
 
 int Tcl_AppInit(Tcl_Interp *interp) {
 
-#ifdef USE_TCL_STUBS
-    if (Tcl_InitStubs(interp,"8.2.0",0) == NULL) {
+    if (Tcl_InitStubs(interp,"8.2",0) == NULL) {
 	return TCL_ERROR;
     }
-#endif
 
     if (Tcl_Init(interp) == TCL_ERROR) {
 	return TCL_ERROR;

Modified: tcl/websh/trunk/src/generic/web.c
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/generic/web.c?rev=794020&r1=794019&r2=794020&view=diff
==============================================================================
--- tcl/websh/trunk/src/generic/web.c (original)
+++ tcl/websh/trunk/src/generic/web.c Tue Jul 14 19:11:04 2009
@@ -132,3 +132,29 @@
     return Tcl_PkgProvide(interp, WEBSH, VERSION);
 
 }
+
+
+/* -------------------------------------------------------------------------
+ * ModWebsh_Init --
+ * Init log Plugin and stubs for mod_websh main interpreter 
+ * ------------------------------------------------------------------------- */
+int __declspec(dllexport) ModWebsh_Init(Tcl_Interp * interp)
+{
+
+    if (interp == NULL)
+      return TCL_ERROR;
+
+    /* ---------------------------------------------------------------------
+     * stubs
+     * --------------------------------------------------------------------- */
+    Tcl_InitStubs(interp, "8.2", 0);
+
+    /* ---------------------------------------------------------------------
+     * register Log Module in here
+     * --------------------------------------------------------------------- */
+    if (log_Init(interp) == TCL_ERROR) {
+      return TCL_ERROR;
+    }
+
+    return TCL_OK;
+}

Modified: tcl/websh/trunk/src/generic/web.h
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/generic/web.h?rev=794020&r1=794019&r2=794020&view=diff
==============================================================================
--- tcl/websh/trunk/src/generic/web.h (original)
+++ tcl/websh/trunk/src/generic/web.h Tue Jul 14 19:11:04 2009
@@ -33,6 +33,7 @@
 #include "modwebsh.h"
 
 int __declspec(dllexport) Websh_Init(Tcl_Interp * interp);
+int __declspec(dllexport) ModWebsh_Init(Tcl_Interp * interp);
 
 int Script_Init(Tcl_Interp * interp);
 



---------------------------------------------------------------------
To unsubscribe, e-mail: websh-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-cvs-help@tcl.apache.org