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 2005/03/12 15:26:20 UTC
cvs commit: tcl-rivet/src mod_rivet.c
davidw 2005/03/12 06:26:20
Modified: . ChangeLog Makefile.am
doc rivet.xml
doc/html help.en.html index.en.html rivet.en.html
src mod_rivet.c
Log:
* src/mod_rivet.c (Rivet_SendContent): Use static objects for scripts
that are used for each request, in order to keep reusing them.
(Rivet_PerInterpInit): Switch back to using Tcl_PkgRequire.
Revision Changes Path
1.222 +18 -7 tcl-rivet/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /home/cvs/tcl-rivet/ChangeLog,v
retrieving revision 1.221
retrieving revision 1.222
diff -u -r1.221 -r1.222
--- ChangeLog 8 Jan 2005 18:01:41 -0000 1.221
+++ ChangeLog 12 Mar 2005 14:26:20 -0000 1.222
@@ -1,3 +1,10 @@
+2005-03-12 David N. Welton <da...@dedasys.com>
+
+ * src/mod_rivet.c (Rivet_SendContent): Use static objects for
+ scripts that are used for each request, in order to keep reusing
+ them.
+ (Rivet_PerInterpInit): Switch back to using Tcl_PkgRequire.
+
2005-01-08 Karl Lehenbauer <ka...@sc.com>
* rivet/packages/dio/diodisplay.tcl: Accept arguments to the
@@ -18,6 +25,10 @@
* rivet/packages/form/form.tcl: Commented the package.
+2005-01-03 David N. Welton <da...@dedasys.com>
+
+ * doc/rivet.xml: Use 'mail-archives' instead of nagoya.
+
2004-12-22 David N. Welton <da...@dedasys.com>
* Makefile.am (install-data-local): Added this target to install
@@ -44,13 +55,13 @@
2004-12-03 Karl Lehenbauer <ka...@sc.com>
- * rivet/packages/dio/dio.tcl: Cause fatal database errors such
+ * rivet/packages/dio/dio.tcl: Cause fatal database errors such
as bad syntax, etc, to raise a Tcl error in many methods that
used to just return 1 or 0 (like DIO store).
* configure.ac: Remove superfluous commented-out lines
- * Add BUGS file. Update STATUS and VERSION files.
+ * Add BUGS file. Update STATUS and VERSION files.
2004-12-02 David N. Welton <da...@dedasys.com>
@@ -64,9 +75,9 @@
2004-12-02 Karl Lehenbauer <ka...@sc.com>
- * Collected some build notes in README.configure
+ * Collected some build notes in README.configure
- * Clean up presentation of --with-apxs and --with-tclsh and
+ * Clean up presentation of --with-apxs and --with-tclsh and
have them show up when configure --help is run.
* tclconfig/tcl.m4, configure.ac, config.h, src/*.c:
@@ -81,16 +92,16 @@
as well as the technique for using automake to simplify
the build)
- * Move aclocal.m4 to acinclude.m4 -- we need the aclocal command
+ * Move aclocal.m4 to acinclude.m4 -- we need the aclocal command
to generate acinclude.m4 based on aclocal.m4 and stuff it gleans
from the configure.ac script, etc.
- * configure.ac: A path to tclsh is automatically figured out by the
+ * configure.ac: A path to tclsh is automatically figured out by the
TEA 3.1 build stuff. However it is also possible to override
with --with-tclsh, and the configure script also makes sure
there at least is a file there as well.
- * src/configure.ac et al: Get automake, aclocal, and autoconf to run
+ * src/configure.ac et al: Get automake, aclocal, and autoconf to run
without complaint, generating the configure script, Makefile.in
files, etc.
1.6 +4 -3 tcl-rivet/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/tcl-rivet/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Makefile.am 22 Dec 2004 10:51:47 -0000 1.5
+++ Makefile.am 12 Mar 2005 14:26:20 -0000 1.6
@@ -14,6 +14,7 @@
$(SHELL) ./config.status --recheck
install-data-local:
- cp -r rivet $(DESTDIR)/@TCL_PACKAGE_PATH@
+ $(mkinstalldirs) $(DESTDIR)@libdir@/rivet@VERSION@
+ cp -r rivet/* $(DESTDIR)@libdir@/rivet@VERSION@
# This little bit of line noise generates the package index file (pkgIndex.tcl)
- ( cd $(DESTDIR)/@TCL_PACKAGE_PATH@/rivet ; echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
\ No newline at end of file
+ ( cd $(DESTDIR)@libdir@/rivet@VERSION@ ; echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
\ No newline at end of file
1.52 +4 -4 tcl-rivet/doc/rivet.xml
Index: rivet.xml
===================================================================
RCS file: /home/cvs/tcl-rivet/doc/rivet.xml,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- rivet.xml 16 Dec 2004 18:08:50 -0000 1.51
+++ rivet.xml 12 Mar 2005 14:26:20 -0000 1.52
@@ -3964,7 +3964,7 @@
</para>
<para>
The mailing list archives are available at <ulink
- url="http://nagoya.apache.org/eyebrowse/SummarizeList?listId=118"/>
+ url="http://mail-archives.apache.org/eyebrowse/SummarizeList?listId=118"/>
</para>
</section>
@@ -4020,7 +4020,7 @@
<para>
Apache Rivet uses the Apache Bug Tracking system at <ulink
- url="http://nagoya.apache.org/bugzilla/"></ulink>. Here,
+ url="http://issues.apache.org/bugzilla/"></ulink>. Here,
you can report problems, or check and see if existing issues
are already known and being dealt with.
</para>
1.14 +4 -4 tcl-rivet/doc/html/help.en.html
Index: help.en.html
===================================================================
RCS file: /home/cvs/tcl-rivet/doc/html/help.en.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- help.en.html 16 Dec 2004 18:09:13 -0000 1.13
+++ help.en.html 12 Mar 2005 14:26:20 -0000 1.14
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Resources - How to Get Help</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.en.html" title="Apache Rivet"><link rel="up" href="index.en.html" title="Apache Rivet"><link rel="prev" href="session_package.en.html" title="Session Package"><link rel="next" href="internals.en.html" title="Rivet Internals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Resources - How to Get Help</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="session_package.en.html"><img src="images/prev.png" alt="Prev"></a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="internals.en.html"><img src="images/next.png" alt="Next"></a></td></tr></table></div><div class="section" lang="en"><div class="titlepage"><div><div><hr><h2 class="title" style="clear: both"><a name="help"></a>Resources - How to Get Help</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="help.en.html#id4774947">Mailing Lists</a></span></dt><dt><span class="section"><a href="help.en.html#id4774992">Newsgroup</a></span></dt><dt><span class="section"><a href="help.en.html#websites">Web Sites</a></span></dt><dt><span class="section"><a href="help.en.html#id4775079">Bug Tracking System</a></span></dt><dt><span class="section"><a href="help.en.html#id4775097">IRC</a></span></dt><dt><span class="section"><a href="help.en.html#id4775108">Editing Rivet Template Files</a></span></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4774947"></a>Mailing Lists</h3></div></div></div><p style="width:90%">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Resources - How to Get Help</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.en.html" title="Apache Rivet"><link rel="up" href="index.en.html" title="Apache Rivet"><link rel="prev" href="session_package.en.html" title="Session Package"><link rel="next" href="internals.en.html" title="Rivet Internals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Resources - How to Get Help</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="session_package.en.html"><img src="images/prev.png" alt="Prev"></a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="internals.en.html"><img src="images/next.png" alt="Next"></a></td></tr></table></div><div class="section" lang="en"><div class="titlepage"><div><div><hr><h2 class="title" style="clear: both"><a name="help"></a>Resources - How to Get Help</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="help.en.html#id4774947">Mailing Lists</a></span></dt><dt><span class="section"><a href="help.en.html#id4774992">Newsgroup</a></span></dt><dt><span class="section"><a href="help.en.html#websites">Web Sites</a></span></dt><dt><span class="section"><a href="help.en.html#id4775079">Bug Tracking System</a></span></dt><dt><span class="section"><a href="help.en.html#id4775097">IRC</a></span></dt><dt><span class="section"><a href="help.en.html#id4775109">Editing Rivet Template Files</a></span></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4774947"></a>Mailing Lists</h3></div></div></div><p style="width:90%">
The Rivet mailing list is the first place you should turn for
help, if you haven't found the solution to your problem in the
documentation. Send email to
@@ -10,7 +10,7 @@
where <i class="replaceable"><tt>list</tt></i> is either dev or user.
Currently, dev is the preferred list to use.
</p><p style="width:90%">
- The mailing list archives are available at <a href="http://nagoya.apache.org/eyebrowse/SummarizeList?listId=118" target="_top">http://nagoya.apache.org/eyebrowse/SummarizeList?listId=118</a>
+ The mailing list archives are available at <a href="http://mail-archives.apache.org/eyebrowse/SummarizeList?listId=118" target="_top">http://mail-archives.apache.org/eyebrowse/SummarizeList?listId=118</a>
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4774992"></a>Newsgroup</h3></div></div></div><p style="width:90%">
The <a href="news:comp.lang.tcl" target="_top">news:comp.lang.tcl</a> newsgroup is a good
place to ask about Tcl questions in general. Rivet developers
@@ -34,13 +34,13 @@
<a href="http://wiki.tcl.tk" target="_top">http://wiki.tcl.tk</a> is the Tcl'ers Wiki, a
free-form place to search for answers and ask for help.
</div></li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4775079"></a>Bug Tracking System</h3></div></div></div><p style="width:90%">
- Apache Rivet uses the Apache Bug Tracking system at <a href="http://nagoya.apache.org/bugzilla/" target="_top">http://nagoya.apache.org/bugzilla/</a>. Here,
+ Apache Rivet uses the Apache Bug Tracking system at <a href="http://issues.apache.org/bugzilla/" target="_top">http://issues.apache.org/bugzilla/</a>. Here,
you can report problems, or check and see if existing issues
are already known and being dealt with.
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4775097"></a>IRC</h3></div></div></div><p style="width:90%">
Occasionally, someone from the Rivet team is on IRC at
irc.freenode.net, channel #tcl.
- </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4775108"></a>Editing Rivet Template Files</h3></div></div></div><p style="width:90%">
+ </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4775109"></a>Editing Rivet Template Files</h3></div></div></div><p style="width:90%">
Rivet makes available code for two popular editors,
<span class="application">emacs</span> and
<span class="application">vim</span> to facilitate the editing of
1.17 +1 -1 tcl-rivet/doc/html/index.en.html
Index: index.en.html
===================================================================
RCS file: /home/cvs/tcl-rivet/doc/html/index.en.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- index.en.html 22 Dec 2004 10:51:47 -0000 1.16
+++ index.en.html 12 Mar 2005 14:26:20 -0000 1.17
@@ -1,6 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Apache Rivet</title><link rel="stylesheet" href="rivet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.en.html" title="Apache Rivet"><link rel="next" href="installation.en.html" title="Apache Rivet Installation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Apache Rivet</th></tr><tr><td width="20%" align="left">�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="installation.en.html"><img src="images/next.png" alt="Next"></a></td></tr></table></div><div class="article" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id4765364"></a>Apache Rivet</h1></div><div><div class="author"><h3 class="author"><span class="firstname">The Rivet Team</span></h3><div class="affiliation"><span class="orgname">The Apache Software Foundation<br></span><div class="address"><p><br>
��<tt class="email"><<a href="mailto:rivet-dev@tcl.apache.org">rivet-dev@tcl.apache.org</a>></tt><br>
- </p></div></div></div></div><div><p class="copyright">Copyright � 2002, 2003, 2004 Apache Software Foundation</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="index.en.html#id4708346">Introduction to Apache Rivet</a></span></dt><dt><span class="section"><a href="installation.en.html">Apache Rivet Installation</a></span></dt><dt><span class="section"><a href="directives.en.html">Rivet Apache Directives</a></span></dt><dt><span class="section"><a href="commands.en.html">Rivet Tcl Commands and Variables</a></span></dt><dt><span class="section"><a href="examples.en.html">Examples and Usage</a></span></dt><dt><span class="section"><a href="tcl_packages.en.html">Rivet Tcl Packages</a></span></dt><dt><span class="section"><a href="dio.en.html">DIO - Database Interface Objects</a></span></dt><dt><span class="section"><a href="diodisplay.en.html">DIODisplay - Database Interface Objects Display Class</a></span></dt><dt><span class="section"><a href="session_package.en.html">Session Package</a></span></dt><dd><dl><dt><span class="section"><a href="session_package.en.html#id4774045">Introduction</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774082">Requirements</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774096">Preparing To Use It</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774145">Example Usage</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774212">Using Sessions From Your Code</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774419">Session Configuration Options</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774674">Session Methods</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774912">Getting Additional Randomness From The Entropy File</a></span></dt></dl></dd><dt><span class="section"><a href="help.en.html">Resources - How to Get Help</a></span></dt><dd><dl><dt><span class="section"><a href="help.en.html#id4774947">Mailing Lists</a></span></dt><dt><span class="section"><a href="help.en.html#id4774992">Newsgroup</a></span></dt><dt><span class="section"><a href="help.en.html#websites">Web Sites</a></span></dt><dt><span class="section"><a href="help.en.html#id4775079">Bug Tracking System</a></span></dt><dt><span class="section"><a href="help.en.html#id4775097">IRC</a></span></dt><dt><span class="section"><a href="help.en.html#id4775108">Editing Rivet Template Files</a></span></dt></dl></dd><dt><span class="section"><a href="internals.en.html">Rivet Internals</a></span></dt><dd><dl><dt><span class="section"><a href="internals.en.html#id4775178">Initialization</a></span></dt><dt><span class="section"><a href="internals.en.html#id4775217">RivetChan</a></span></dt><dt><span class="section"><a href="internals.en.html#id4775244">The <span style="font-family:monospace"><span><b class="command">global</b></span></span> Command</a></span></dt><dt><span class="section"><a href="internals.en.html#id4775295">Page Parsing, Execution and Caching</a></span></dt><dt><span class="section"><a href="internals.en.html#id4775345">Debugging Rivet and Apache</a></span></dt></dl></dd><dt><span class="section"><a href="upgrading.en.html">Upgrading from mod_dtcl or NeoWebScript</a></span></dt><dd><dl><dt><span class="section"><a href="upgrading.en.html#id4775518">mod_dtcl</a></span></dt><dt><span class="section"><a href="upgrading.en.html#id4775530">NeoWebScript</a></span></dt></dl></dd></dl></div><p style="width:90%">
+ </p></div></div></div></div><div><p class="copyright">Copyright � 2002, 2003, 2004 Apache Software Foundation</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="index.en.html#id4708346">Introduction to Apache Rivet</a></span></dt><dt><span class="section"><a href="installation.en.html">Apache Rivet Installation</a></span></dt><dt><span class="section"><a href="directives.en.html">Rivet Apache Directives</a></span></dt><dt><span class="section"><a href="commands.en.html">Rivet Tcl Commands and Variables</a></span></dt><dt><span class="section"><a href="examples.en.html">Examples and Usage</a></span></dt><dt><span class="section"><a href="tcl_packages.en.html">Rivet Tcl Packages</a></span></dt><dt><span class="section"><a href="dio.en.html">DIO - Database Interface Objects</a></span></dt><dt><span class="section"><a href="diodisplay.en.html">DIODisplay - Database Interface Objects Display Class</a></span></dt><dt><span class="section"><a href="session_package.en.html">Session Package</a></span></dt><dd><dl><dt><span class="section"><a href="session_package.en.html#id4774045">Introduction</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774082">Requirements</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774096">Preparing To Use It</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774145">Example Usage</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774212">Using Sessions From Your Code</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774419">Session Configuration Options</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774674">Session Methods</a></span></dt><dt><span class="section"><a href="session_package.en.html#id4774912">Getting Additional Randomness From The Entropy File</a></span></dt></dl></dd><dt><span class="section"><a href="help.en.html">Resources - How to Get Help</a></span></dt><dd><dl><dt><span class="section"><a href="help.en.html#id4774947">Mailing Lists</a></span></dt><dt><span class="section"><a href="help.en.html#id4774992">Newsgroup</a></span></dt><dt><span class="section"><a href="help.en.html#websites">Web Sites</a></span></dt><dt><span class="section"><a href="help.en.html#id4775079">Bug Tracking System</a></span></dt><dt><span class="section"><a href="help.en.html#id4775097">IRC</a></span></dt><dt><span class="section"><a href="help.en.html#id4775109">Editing Rivet Template Files</a></span></dt></dl></dd><dt><span class="section"><a href="internals.en.html">Rivet Internals</a></span></dt><dd><dl><dt><span class="section"><a href="internals.en.html#id4775178">Initialization</a></span></dt><dt><span class="section"><a href="internals.en.html#id4775217">RivetChan</a></span></dt><dt><span class="section"><a href="internals.en.html#id4775244">The <span style="font-family:monospace"><span><b class="command">global</b></span></span> Command</a></span></dt><dt><span class="section"><a href="internals.en.html#id4775295">Page Parsing, Execution and Caching</a></span></dt><dt><span class="section"><a href="internals.en.html#id4775345">Debugging Rivet and Apache</a></span></dt></dl></dd><dt><span class="section"><a href="upgrading.en.html">Upgrading from mod_dtcl or NeoWebScript</a></span></dt><dd><dl><dt><span class="section"><a href="upgrading.en.html#id4775518">mod_dtcl</a></span></dt><dt><span class="section"><a href="upgrading.en.html#id4775530">NeoWebScript</a></span></dt></dl></dd></dl></div><p style="width:90%">
This document is also available in the following languages: <a href="index.it.html" target="_top">Italian</a>, <a href="index.ru.html" target="_top">Russian</a>
</p><p style="width:90%">
Document revision: $Revision$, last modified $Date$ by $Author$.
1.10 +2 -2 tcl-rivet/doc/html/rivet.en.html
Index: rivet.en.html
===================================================================
RCS file: /home/cvs/tcl-rivet/doc/html/rivet.en.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- rivet.en.html 22 Dec 2004 10:51:47 -0000 1.9
+++ rivet.en.html 12 Mar 2005 14:26:20 -0000 1.10
@@ -1496,7 +1496,7 @@
where <i class="replaceable"><tt>list</tt></i> is either dev or user.
Currently, dev is the preferred list to use.
</p><p style="width:90%">
- The mailing list archives are available at <a href="http://nagoya.apache.org/eyebrowse/SummarizeList?listId=118" target="_top">http://nagoya.apache.org/eyebrowse/SummarizeList?listId=118</a>
+ The mailing list archives are available at <a href="http://mail-archives.apache.org/eyebrowse/SummarizeList?listId=118" target="_top">http://mail-archives.apache.org/eyebrowse/SummarizeList?listId=118</a>
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4754534"></a>Newsgroup</h3></div></div></div><p style="width:90%">
The <a href="news:comp.lang.tcl" target="_top">news:comp.lang.tcl</a> newsgroup is a good
place to ask about Tcl questions in general. Rivet developers
@@ -1520,7 +1520,7 @@
<a href="http://wiki.tcl.tk" target="_top">http://wiki.tcl.tk</a> is the Tcl'ers Wiki, a
free-form place to search for answers and ask for help.
</div></li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4754621"></a>Bug Tracking System</h3></div></div></div><p style="width:90%">
- Apache Rivet uses the Apache Bug Tracking system at <a href="http://nagoya.apache.org/bugzilla/" target="_top">http://nagoya.apache.org/bugzilla/</a>. Here,
+ Apache Rivet uses the Apache Bug Tracking system at <a href="http://issues.apache.org/bugzilla/" target="_top">http://issues.apache.org/bugzilla/</a>. Here,
you can report problems, or check and see if existing issues
are already known and being dealt with.
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4754639"></a>IRC</h3></div></div></div><p style="width:90%">
1.80 +38 -21 tcl-rivet/src/mod_rivet.c
Index: mod_rivet.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/mod_rivet.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- mod_rivet.c 3 Dec 2004 02:17:11 -0000 1.79
+++ mod_rivet.c 12 Mar 2005 14:26:20 -0000 1.80
@@ -1,6 +1,6 @@
/* mod_rivet.c -- The apache module itself, for Apache 1.3. */
-/* Copyright 2000-2004 The Apache Software Foundation
+/* Copyright 2000-2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -33,6 +33,9 @@
/* Tcl includes */
#include <tcl.h>
+/* There is code ifdef'ed out below which uses internal
+ * declerations. */
+/* #include <tclInt.h> */
#include <string.h>
/* Rivet Includes */
@@ -389,8 +392,8 @@
int retval;
Tcl_Interp *interp;
- Tcl_Obj *request_init;
- Tcl_Obj *request_cleanup;
+ static Tcl_Obj *request_init = NULL;
+ static Tcl_Obj *request_cleanup = NULL;
rivet_interp_globals *globals = NULL;
rivet_server_conf *rsc = NULL;
@@ -441,24 +444,38 @@
ap_chdir_file(r->filename);
Rivet_PropagatePerDirConfArrays( interp, rdc );
- request_init = Tcl_NewStringObj("::Rivet::initialize_request\n", -1);
- Tcl_IncrRefCount(request_init);
- if (Tcl_EvalObjEx(interp, request_init, TCL_EVAL_DIRECT) == TCL_ERROR)
+
+ /* Initialize this the first time through and keep it around. */
+ if (request_init == NULL) {
+ request_init = Tcl_NewStringObj("::Rivet::initialize_request\n", -1);
+ Tcl_IncrRefCount(request_init);
+ }
+ if (Tcl_EvalObjEx(interp, request_init, 0) == TCL_ERROR)
{
ap_log_error(APLOG_MARK, APLOG_ERR, r->server,
"Could not create request namespace\n");
retval = HTTP_BAD_REQUEST;
- Tcl_DecrRefCount(request_init);
goto sendcleanup;
}
- Tcl_DecrRefCount(request_init);
+ /* Set the script name. */
{
- Tcl_Obj *infoscript = Tcl_NewStringObj("info script ", -1);
- Tcl_IncrRefCount(infoscript);
- Tcl_AppendToObj(infoscript, r->filename, -1);
- Tcl_EvalObjEx(interp, infoscript, TCL_EVAL_DIRECT);
- Tcl_DecrRefCount(infoscript);
+#if 1
+ Tcl_Obj *infoscript = Tcl_NewStringObj("info script ", -1);
+ Tcl_IncrRefCount(infoscript);
+ Tcl_AppendToObj(infoscript, r->filename, -1);
+ Tcl_EvalObjEx(interp, infoscript, TCL_EVAL_DIRECT);
+ Tcl_DecrRefCount(infoscript);
+#else
+ /* This speeds things up, but you have to use Tcl internal
+ * declerations, which is not so great... */
+ Interp *iPtr = (Interp *) interp;
+ if (iPtr->scriptFile != NULL) {
+ Tcl_DecrRefCount(iPtr->scriptFile);
+ }
+ iPtr->scriptFile = Tcl_NewStringObj(r->filename, -1);
+ Tcl_IncrRefCount(iPtr->scriptFile);
+#endif
}
/* Apache Request stuff */
@@ -494,17 +511,16 @@
Tcl_GetVar(interp, "errorInfo", 0));
}
- request_cleanup = Tcl_NewStringObj("::Rivet::cleanup_request\n", -1);
- Tcl_IncrRefCount(request_cleanup);
- if(Tcl_EvalObjEx(interp, request_cleanup, TCL_EVAL_DIRECT) == TCL_ERROR) {
+ if (request_cleanup == NULL) {
+ request_cleanup = Tcl_NewStringObj("::Rivet::cleanup_request\n", -1);
+ Tcl_IncrRefCount(request_cleanup);
+ }
+ if(Tcl_EvalObjEx(interp, request_cleanup, 0) == TCL_ERROR) {
ap_log_error(APLOG_MARK, APLOG_ERR, r->server, "%s",
Tcl_GetVar(interp, "errorInfo", 0));
}
- Tcl_DecrRefCount(request_cleanup);
/* Reset globals */
-
-
Rivet_CleanupRequest( r );
retval = OK;
@@ -647,8 +663,9 @@
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_Eval (interp, "source $::server(RIVET_INIT)") == TCL_ERROR) {
+ /* Eval Rivet's init.tcl file to load in the Tcl-level
+ commands. */
+ if (Tcl_PkgRequire(interp, "RivetTcl", "1.1", 1) == NULL) {
ap_log_error( APLOG_MARK, APLOG_ERR, s,
"init.tcl must be installed correctly for Apache Rivet to function: %s",
Tcl_GetStringResult(interp) );
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org