You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2012/12/13 01:32:15 UTC
svn commit: r1421053 - in /tcl/rivet/trunk: ChangeLog VERSION configure.ac
rivet/init.tcl src/apache-2/mod_rivet.c
Author: mxmanghi
Date: Thu Dec 13 00:32:03 2012
New Revision: 1421053
URL: http://svn.apache.org/viewvc?rev=1421053&view=rev
Log:
* src/apache-2/mod_rivet.c: Tcl_PkgRequire for packages Rivet and rivetlib
are exchanged so that commands in librivet.so can be imported when
they are on the export list and a programmer issues a 'package require ::rivet'
* rivet/init.tcl: this script is now providing package 'Rivet' instead of
'RivetTcl'. init.tcl initializes the Tcl core of Rivet and a package rivet
has to exists for compatibility with version 2.0 where it was provided
rather pointelessly by librivet.so.
Modified:
tcl/rivet/trunk/ChangeLog
tcl/rivet/trunk/VERSION
tcl/rivet/trunk/configure.ac
tcl/rivet/trunk/rivet/init.tcl
tcl/rivet/trunk/src/apache-2/mod_rivet.c
Modified: tcl/rivet/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/ChangeLog?rev=1421053&r1=1421052&r2=1421053&view=diff
==============================================================================
--- tcl/rivet/trunk/ChangeLog (original)
+++ tcl/rivet/trunk/ChangeLog Thu Dec 13 00:32:03 2012
@@ -1,3 +1,12 @@
+2012-12-12 Massimo Manghi <mx...@apache.org>
+ * src/apache-2/mod_rivet.c: Tcl_PkgRequire for packages Rivet and rivetlib
+ are exchanged so that commands in librivet.so can be imported when
+ they are on the export list and a programmer issues a 'package require ::rivet'
+ * rivet/init.tcl: this script is now providing package 'Rivet' instead of
+ 'RivetTcl'. init.tcl initializes the Tcl core of Rivet and a package rivet
+ has to exists for compatibility with version 2.0 where it was provided
+ rather pointelessly by librivet.so.
+
2012-12-03 Massimo Manghi <mx...@apache.org>
* doc/Makefile.am: Manual pages output encoding set to UTF-8
Modified: tcl/rivet/trunk/VERSION
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/VERSION?rev=1421053&r1=1421052&r2=1421053&view=diff
==============================================================================
--- tcl/rivet/trunk/VERSION (original)
+++ tcl/rivet/trunk/VERSION Thu Dec 13 00:32:03 2012
@@ -1 +1 @@
-2.1.0a1
+2.1.0
Modified: tcl/rivet/trunk/configure.ac
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/configure.ac?rev=1421053&r1=1421052&r2=1421053&view=diff
==============================================================================
--- tcl/rivet/trunk/configure.ac (original)
+++ tcl/rivet/trunk/configure.ac Thu Dec 13 00:32:03 2012
@@ -22,7 +22,7 @@ dnl
# so you can encode the package version directly into the source files.
#-----------------------------------------------------------------------
-AC_INIT([Rivet],[2.1.0b1])
+AC_INIT([Rivet],[2.1.0])
TEA_INIT([3.9])
AC_CONFIG_AUX_DIR(tclconfig)
Modified: tcl/rivet/trunk/rivet/init.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/init.tcl?rev=1421053&r1=1421052&r2=1421053&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/init.tcl (original)
+++ tcl/rivet/trunk/rivet/init.tcl Thu Dec 13 00:32:03 2012
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-package provide RivetTcl 2.1
+package provide Rivet 2.1
namespace eval ::Rivet {
@@ -117,11 +117,11 @@ namespace eval ::Rivet {
set tclpath [file join [file dirname [info script]] rivet-tcl]
set auto_path [linsert $auto_path 0 $tclpath]
- ## As we moved the commands ensemble to ::rivet namespace we
+ ## As we moved the commands set to ::rivet namespace we
## we want to guarantee the commands are still accessible
## at global level by putting them on the export list.
## Importing the ::rivet namespace is deprecated and we should
- ## make it clear that this will be removed in the future
+ ## make it clear in the manual
## we keep in ::rivet::export_list a list of importable commands
@@ -190,7 +190,7 @@ interp alias {} ::incr0 {} incr
# This option is not guaranteed to be supported in future versions.
if {[info exists module_conf(import_rivet_commands)] && $module_conf(import_rivet_commands)} {
- namespace import -force ::rivet::*
+ namespace eval :: { namespace import -force ::rivet::* }
}
array unset module_conf
Modified: tcl/rivet/trunk/src/apache-2/mod_rivet.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/apache-2/mod_rivet.c?rev=1421053&r1=1421052&r2=1421053&view=diff
==============================================================================
--- tcl/rivet/trunk/src/apache-2/mod_rivet.c (original)
+++ tcl/rivet/trunk/src/apache-2/mod_rivet.c Thu Dec 13 00:32:03 2012
@@ -924,7 +924,7 @@ Rivet_PerInterpInit(server_rec *s, rivet
/* Eval Rivet's init.tcl file to load in the Tcl-level commands. */
/* We put in front the auto_path list the path to the directory where
- * init.tcl is located (provides package RivetTcl)
+ * init.tcl is located (provides package Rivet, previously RivetTcl)
*/
auto_path = Tcl_GetVar2Ex(interp,"auto_path",NULL,TCL_GLOBAL_ONLY);
@@ -947,21 +947,35 @@ Rivet_PerInterpInit(server_rec *s, rivet
Rivet_InitServerVariables(interp, p );
// Rivet_PropagateServerConfArray( interp, rsc );
- /* Eval Rivet's init.tcl file to load in the Tcl-level commands. */
- /* Watch out! Calling Tcl_PkgRequire with a version number binds this module to
- * the 'package provide' statement in rivet/init.tcl
+ /* Loading into the interpreter the commands provided by librivet.so */
+ /* Tcl Bug #3216070 has been solved with 8.5.10 and commands shipped with
+ * Rivetlib can be mapped at this stage
*/
- /* If rivet was configured to export the ::rivet namespace commands we have to
- * set the array variable ::rivet::module_conf(export_namespace_commands) before calling init.tcl
+ if (Tcl_PkgRequire(interp, RIVETLIB_TCL_PACKAGE, RIVET_VERSION, 1) == NULL)
+ {
+ ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
+ MODNAME ": Error loading rivetlib package: %s",
+ Tcl_GetStringResult(interp) );
+ exit(1);
+ }
+
+ /* If rivet is configured to export the ::rivet namespace commands we set the
+ * array variable ::rivet::module_conf(export_namespace_commands) before calling init.tcl
* This array will be unset after commands are exported.
*/
Tcl_SetVar2Ex(interp,"module_conf","export_namespace_commands",Tcl_NewIntObj(RIVET_NAMESPACE_EXPORT),0);
Tcl_SetVar2Ex(interp,"module_conf","import_rivet_commands",Tcl_NewIntObj(RIVET_NAMESPACE_IMPORT),0);
- if (Tcl_PkgRequire(interp, "RivetTcl", "2.1", 1) == NULL)
+ /* Eval Rivet's init.tcl file to load in the Tcl-level commands. */
+
+ /* Watch out! Calling Tcl_PkgRequire with a version number binds this module to
+ * the Rivet package revision number in rivet/init.tcl
+ */
+
+ if (Tcl_PkgRequire(interp, "Rivet", "2.1", 1) == NULL)
{
ap_log_error (APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
MODNAME ": init.tcl must be installed correctly for Apache Rivet to function: %s (%s)",
@@ -969,19 +983,6 @@ Rivet_PerInterpInit(server_rec *s, rivet
exit(1);
}
- /* Loading into the interpreter the commands provided by librivet.so */
-
- /* Tcl Bug #3216070 has been solved with 8.5.10 and commands shipped with
- * Rivetlib can be mapped at this stage
- */
-
- if (Tcl_PkgRequire(interp, RIVETLIB_TCL_PACKAGE, "1.2", 1) == NULL)
- {
- ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
- MODNAME ": Error loading rivetlib package: %s",
- Tcl_GetStringResult(interp) );
- exit(1);
- }
/* */
/* Set the output buffer size to the largest allowed value, so that we
---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org