You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by da...@apache.org on 2002/03/13 12:32:26 UTC
cvs commit: tcl-rivet/src mod_rivet.c
davidw 02/03/13 03:32:26
Modified: . ChangeLog
src mod_rivet.c
Log:
* src/mod_rivet.c (Rivet_InitTclStuff): Moved creation of "rivet"
AssocData here.
Revision Changes Path
1.40 +5 -0 tcl-rivet/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /home/cvs/tcl-rivet/ChangeLog,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- ChangeLog 13 Mar 2002 10:37:27 -0000 1.39
+++ ChangeLog 13 Mar 2002 11:32:26 -0000 1.40
@@ -1,3 +1,8 @@
+2002-03-13 David N. Welton <da...@dedasys.com>
+
+ * src/mod_rivet.c (Rivet_InitTclStuff): Moved creation of "rivet"
+ AssocData here.
+
2002-03-12 Damon J. Courtney <da...@unreality.com>
* src/mod_rivet.c
1.36 +12 -5 tcl-rivet/src/mod_rivet.c
Index: mod_rivet.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/mod_rivet.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- mod_rivet.c 13 Mar 2002 06:51:18 -0000 1.35
+++ mod_rivet.c 13 Mar 2002 11:32:26 -0000 1.36
@@ -55,7 +55,7 @@
* originally written at the National Center for Supercomputing Applications,
* University of Illinois, Urbana-Champaign. */
-/* $Id: mod_rivet.c,v 1.35 2002/03/13 06:51:18 damonc Exp $ */
+/* $Id: mod_rivet.c,v 1.36 2002/03/13 11:32:26 davidw Exp $ */
/* mod_rivet.c by David Welton <da...@apache.org>
* and Damon Courtney <da...@unreality.com>
@@ -352,11 +352,10 @@
rivet_server_conf *rsc = NULL;
rivet_server_conf *rdc;
rsc = Rivet_GetConf(r);
- globals = ap_pcalloc(r->pool, sizeof(rivet_interp_globals));
+ interp = rsc->server_interp;
+ globals = Tcl_GetAssocData(interp, "rivet", NULL);
globals->r = r;
globals->req = (TclWebRequest *)ap_pcalloc(r->pool, sizeof(TclWebRequest));
- interp = rsc->server_interp;
- Tcl_SetAssocData(interp, "rivet", NULL, globals);
rdc = RIVET_SERVER_CONF( r->per_dir_config );
@@ -502,6 +501,7 @@
{
int rslt;
Tcl_Interp *interp;
+ rivet_interp_globals *globals = NULL;
rivet_server_conf *rsc = RIVET_SERVER_CONF( s->module_config );
server_rec *sr;
@@ -540,6 +540,10 @@
Rivet_PropagateServerConfArray( interp, rsc );
+ /* Set up interpreter associated data */
+ globals = ap_pcalloc(p, sizeof(rivet_interp_globals));
+ Tcl_SetAssocData(interp, "rivet", NULL, globals);
+
/* Eval Rivet's init.tcl file to load in the Tcl-level commands. */
if( Tcl_EvalFile( interp, ap_server_root_relative(p, RIVET_INIT) )
== TCL_ERROR ) {
@@ -588,8 +592,9 @@
myrsc = RIVET_NEW_CONF(p);
ap_set_module_config(sr->module_config, &rivet_module, myrsc);
Rivet_CopyConfig( rsc, myrsc );
- if (rsc->seperate_virtual_interps != 0)
+ if (rsc->seperate_virtual_interps != 0) {
myrsc->server_interp = NULL;
+ }
} else {
myrsc = RIVET_SERVER_CONF( sr->module_config );
}
@@ -601,6 +606,8 @@
Tcl_SetChannelOption(myrsc->server_interp, *(rsc->outchannel),
"-buffering", "none");
Tcl_RegisterChannel(myrsc->server_interp, *(rsc->outchannel));
+ globals = ap_pcalloc(p, sizeof(rivet_interp_globals));
+ Tcl_SetAssocData(myrsc->server_interp, "rivet", NULL, globals);
}
myrsc->server_name = ap_pstrdup(p, sr->server_hostname);
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org