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 2016/11/19 11:15:01 UTC

svn commit: r1770480 - in /tcl/rivet/trunk: ChangeLog configure.ac src/mod_rivet/rivetInspect.c

Author: mxmanghi
Date: Sat Nov 19 11:15:01 2016
New Revision: 1770480

URL: http://svn.apache.org/viewvc?rev=1770480&view=rev
Log:
    * src/mod-rivet/rivetInspect.c: now returning
    an empty string if a value is undefined
    * configure.ac: now defaults to non automatic
    import of ::rivet namespace into global namespace


Modified:
    tcl/rivet/trunk/ChangeLog
    tcl/rivet/trunk/configure.ac
    tcl/rivet/trunk/src/mod_rivet/rivetInspect.c

Modified: tcl/rivet/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/ChangeLog?rev=1770480&r1=1770479&r2=1770480&view=diff
==============================================================================
--- tcl/rivet/trunk/ChangeLog (original)
+++ tcl/rivet/trunk/ChangeLog Sat Nov 19 11:15:01 2016
@@ -1,3 +1,9 @@
+2016-11-19 Massimo Manghi <mx...@apache.org>
+    * src/mod-rivet/rivetInspect.c: now returning
+    an empty string if a value is undefined
+    * configure.ac: now defaults to non automatic
+    import of ::rivet namespace into global namespace
+
 2016-11-17 Massimo Manghi <mx...@apache.org>
     * rivet/packages/dio/dio_Postgresql.tcl: applied
     consistent single quote character handling by

Modified: tcl/rivet/trunk/configure.ac
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/configure.ac?rev=1770480&r1=1770479&r2=1770480&view=diff
==============================================================================
--- tcl/rivet/trunk/configure.ac (original)
+++ tcl/rivet/trunk/configure.ac Sat Nov 19 11:15:01 2016
@@ -759,7 +759,7 @@ AC_DEFUN([IMPORT_RIVET_COMMANDS],[
         import-rivet-commands,
         [  --disable-import-rivet-commands requires explicit namespace import],
         [ import_rivet_commands=$enable_import_rivet_commands],
-        [ import_rivet_commands="yes"]
+        [ import_rivet_commands="no"]
     )
 
     AC_MSG_CHECKING(if ::rivet namespace will be automatically imported for compatibility)

Modified: tcl/rivet/trunk/src/mod_rivet/rivetInspect.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet/rivetInspect.c?rev=1770480&r1=1770479&r2=1770480&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet/rivetInspect.c (original)
+++ tcl/rivet/trunk/src/mod_rivet/rivetInspect.c Sat Nov 19 11:15:01 2016
@@ -102,7 +102,7 @@ enum confIndices {
  *  - A Tcl_Obj pointer to the parameter value. A NULL
  * pointer works as a signal for an error (invalid parameter)
  * - If the parameter value in the configuration is undefined
- * then the Tcl_Obj string contains the string 'undefined'
+ * then the procedure returns an empty string
  *
  */
 
@@ -141,15 +141,17 @@ Rivet_ReadConfParameter ( Tcl_Interp*
         default: return NULL;
     }
 
-    /* if int_value == NULL and string_value == NULL
-     * we have to return one of the string valued options 
-     * which is underfined, thus we gave it the conventional
-     * value "<undefined>"
-     */
 
     if ((string_value == NULL) && (int_value == NULL))
     {
-        return Tcl_NewStringObj("undefined",-1);
+        /* this case is a bit convoluted and needs a more linear coding. 
+         * Basically: if the function hasn't returned (default branch in the 'switch' selector)
+         * that means the arguent was valid. Since any integer parameter would produce a valid Tcl_Obj
+         * pointer if both the int_value and string_value pointers are NULL that means the value
+         * was a NULL pointer to a string value. We therefore return an empty string 
+         */
+
+        return Tcl_NewStringObj("",-1);
     }
     else if (string_value != NULL)
     {



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