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 2017/02/01 17:43:54 UTC
svn commit: r1781289 - in /tcl/rivet/trunk: ChangeLog Makefile.in
configure.ac rivet/init.tcl rivet/init.tcl.in
rivet/packages/formbroker/formbroker.tcl
rivet/packages/session/session-class.tcl src/mod_rivet_ng/mod_rivet_common.c
Author: mxmanghi
Date: Wed Feb 1 17:43:54 2017
New Revision: 1781289
URL: http://svn.apache.org/viewvc?rev=1781289&view=rev
Log:
* configure.ac: defining and substituting RIVETLIB_VERSION
* rivet/init.tcl.in: the ::rivet namespace is
created already in src/mod_rivet_ng/mod_rivet_common.c
Package rivetlib is loaded here now
* src/mod_rivet_ng/mod_rivet_common.c: in
function Rivet_PerInterpInit more code is
devolved to the Tcl initialization
Modified:
tcl/rivet/trunk/ChangeLog
tcl/rivet/trunk/Makefile.in
tcl/rivet/trunk/configure.ac
tcl/rivet/trunk/rivet/init.tcl
tcl/rivet/trunk/rivet/init.tcl.in
tcl/rivet/trunk/rivet/packages/formbroker/formbroker.tcl
tcl/rivet/trunk/rivet/packages/session/session-class.tcl
tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c
Modified: tcl/rivet/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/ChangeLog?rev=1781289&r1=1781288&r2=1781289&view=diff
==============================================================================
--- tcl/rivet/trunk/ChangeLog (original)
+++ tcl/rivet/trunk/ChangeLog Wed Feb 1 17:43:54 2017
@@ -1,3 +1,13 @@
+2017-02-01 Massimo Manghi <mx...@apache.org>
+ * configure.ac: defining and substituting
+ RIVETLIB_VERSION
+ * rivet/init.tcl.in: the ::rivet namespace is
+ created already in src/mod_rivet_ng/mod_rivet_common.c
+ Package rivetlib is loaded here now
+ * src/mod_rivet_ng/mod_rivet_common.c: in
+ function Rivet_PerInterpInit more code is
+ devolved to the Tcl initialization
+
2017-01-18 Massimo Manghi <mx...@apache.org>
* doc/Makefile.am: integration of the automake
infrastructure and rules
Modified: tcl/rivet/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/Makefile.in?rev=1781289&r1=1781288&r2=1781289&view=diff
==============================================================================
--- tcl/rivet/trunk/Makefile.in (original)
+++ tcl/rivet/trunk/Makefile.in Wed Feb 1 17:43:54 2017
@@ -325,6 +325,8 @@ PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
PKG_TCL_SOURCES = @PKG_TCL_SOURCES@
RANLIB = @RANLIB@
RANLIB_STUB = @RANLIB_STUB@
+RIVETLIB_PACKAGE = @RIVETLIB_PACKAGE@
+RIVETLIB_PACKAGE_VERSION = @RIVETLIB_PACKAGE_VERSION@
RIVET_BASE_INCLUDE = @RIVET_BASE_INCLUDE@
RIVET_SOURCE_BASE = @RIVET_SOURCE_BASE@
RIVET_TCL_TARGET = @RIVET_TCL_TARGET@
Modified: tcl/rivet/trunk/configure.ac
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/configure.ac?rev=1781289&r1=1781288&r2=1781289&view=diff
==============================================================================
--- tcl/rivet/trunk/configure.ac (original)
+++ tcl/rivet/trunk/configure.ac Wed Feb 1 17:43:54 2017
@@ -843,6 +843,8 @@ AX_SPLIT_VERSION
AC_DEFINE_UNQUOTED(INIT_VERSION,"${AX_MAJOR_VERSION}.${AX_MINOR_VERSION}",[Rivet Tcl package version])
AC_MSG_NOTICE([Rivet package version is ${AX_MAJOR_VERSION}.${AX_MINOR_VERSION}])
AC_SUBST(INIT_VERSION,"${AX_MAJOR_VERSION}.${AX_MINOR_VERSION}")
+AC_SUBST(RIVETLIB_PACKAGE,"rivetlib",[rivetlib package name])
+AC_SUBST(RIVETLIB_PACKAGE_VERSION,"${AX_MAJOR_VERSION}.${AX_MINOR_VERSION}")
if test $import_rivet_commands = "yes"; then
AC_MSG_NOTICE([forcing Rivet to export commands from ::rivet namespace])
Modified: tcl/rivet/trunk/rivet/init.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/init.tcl?rev=1781289&r1=1781288&r2=1781289&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/init.tcl (original)
+++ tcl/rivet/trunk/rivet/init.tcl Wed Feb 1 17:43:54 2017
@@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-namespace eval ::rivet {} ; ## create namespace
+package require rivetlib 3.0
+
+# the ::rivet namespace is created in mod_rivet_commoc.c:Rivet_PerInterpInit
+# namespace eval ::rivet {} ; ## create namespace
namespace eval ::Rivet {} ; ## create namespace
## ::Rivet::init
@@ -41,8 +44,8 @@ proc ::Rivet::init {} {
## to override even Rivet's procs.
lappend ::auto_path $::Rivet::packages$::tcl_version .
- ## As we moved the commands set to the ::rivet namespace we
- ## we want to guarantee the commands are still accessible
+ ## As we moved the command set to the ::rivet namespace we
+ ## still want to guarantee the commands to be accessible
## at the global level by putting them on the export list.
## Importing the ::rivet namespace is deprecated and we should
## make it clear in the manual.
Modified: tcl/rivet/trunk/rivet/init.tcl.in
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/init.tcl.in?rev=1781289&r1=1781288&r2=1781289&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/init.tcl.in (original)
+++ tcl/rivet/trunk/rivet/init.tcl.in Wed Feb 1 17:43:54 2017
@@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-namespace eval ::rivet {} ; ## create namespace
+package require @RIVETLIB_PACKAGE@ @RIVETLIB_PACKAGE_VERSION@
+
+# the ::rivet namespace is created in mod_rivet_commoc.c:Rivet_PerInterpInit
+# namespace eval ::rivet {} ; ## create namespace
namespace eval ::Rivet {} ; ## create namespace
## ::Rivet::init
@@ -41,8 +44,8 @@ proc ::Rivet::init {} {
## to override even Rivet's procs.
lappend ::auto_path $::Rivet::packages$::tcl_version .
- ## As we moved the commands set to the ::rivet namespace we
- ## we want to guarantee the commands are still accessible
+ ## As we moved the command set to the ::rivet namespace we
+ ## still want to guarantee the commands to be accessible
## at the global level by putting them on the export list.
## Importing the ::rivet namespace is deprecated and we should
## make it clear in the manual.
Modified: tcl/rivet/trunk/rivet/packages/formbroker/formbroker.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/packages/formbroker/formbroker.tcl?rev=1781289&r1=1781288&r2=1781289&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/packages/formbroker/formbroker.tcl (original)
+++ tcl/rivet/trunk/rivet/packages/formbroker/formbroker.tcl Wed Feb 1 17:43:54 2017
@@ -669,11 +669,14 @@ namespace eval FormBroker {
# the 'vars' dictionary field stores the
# order of form fields in which they are processed
- # (in general this order is destroyed by the Tcl's hash
- # tables algorithm)
+ # (in general this order would be destroyed by the Tcl's hash
+ # tables)
dict with form_list $form_name {::lappend vars $field_name}
+ # this test would handle the case of the most simple possible
+ # variable definition (just the variable name)
+
if {$field_type == ""} {
set field_type string
}
Modified: tcl/rivet/trunk/rivet/packages/session/session-class.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/packages/session/session-class.tcl?rev=1781289&r1=1781288&r2=1781289&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/packages/session/session-class.tcl (original)
+++ tcl/rivet/trunk/rivet/packages/session/session-class.tcl Wed Feb 1 17:43:54 2017
@@ -381,6 +381,7 @@ package require Itcl
# when also the key value is specified only the row for that package-key pair is deleted
#
method clear {packageName {key ""}} {
+
if {$key == ""} {
set keyval [list [$this id] $packageName]
set keyfield {session_id package_}
Modified: tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c?rev=1781289&r1=1781288&r2=1781289&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/mod_rivet_common.c Wed Feb 1 17:43:54 2017
@@ -177,10 +177,9 @@ void Rivet_PerInterpInit(rivet_thread_in
/* If the thread has private data we stuff the server conf
* pointer in the 'running_conf' field.
- * Commands running ouside the request processing know how to
- * get the configuration from the initialization context
- * (e.g. ::rivet::inspect). If private is null they get the
- * server configuration from module_globals->server
+ * Commands running ouside a request processing must figure out
+ * themselves how get a pointer to the configuration from the
+ * context (e.g. ::rivet::inspect)
*/
if (private != NULL) private->running_conf = RIVET_SERVER_CONF (s->module_config);
@@ -191,27 +190,6 @@ void Rivet_PerInterpInit(rivet_thread_in
/* Create a global array with information about the server. */
Rivet_InitServerVariables(interp,p);
- /* Loading into the interpreter commands in 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, 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);
-
/* 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
---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org