import: tcom-3.10b10
authorPat Thoyts <patthoyts@users.sourceforge.net>
Thu, 29 Jan 2009 22:23:30 +0000 (22:23 +0000)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Thu, 29 Jan 2009 22:23:30 +0000 (22:23 +0000)
CHANGES
lib/TclScript/TclScript.dll
lib/tcom/tcom.dll
lib/tcom/tcominproc.dll
lib/tcom/tcomlocal.exe
src/Arguments.cpp

diff --git a/CHANGES b/CHANGES
index 99dedce6475a72c4ce12dd868aae4381df3718fa..07a887af37d5ae2c07c19219e93d88dbbbc81c41 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,7 @@ Version 3.10
 - Fixed invalid pointer error when returned EXCEPINFO contains null
   description.
 - Fixed passing SAFEARRAY(short) parameters.
+- Fixed passing input parameters by reference.
 
 Version 3.9
 - Fixed defect where eval may trigger premature destruction of handle internal
index db25d4dac1507b5a59d4cbdfc8186a001c3c8da3..e386a6e804dec88a35d92f74d63d1701f2ca763a 100644 (file)
Binary files a/lib/TclScript/TclScript.dll and b/lib/TclScript/TclScript.dll differ
index 9f60aa03cdc75915f9098f8d557bd2a02360e6e1..23d954221839c75846accf841e8916d1b65c80d3 100644 (file)
Binary files a/lib/tcom/tcom.dll and b/lib/tcom/tcom.dll differ
index 95fcfca9ed38dad8601f054bb173a91df6be4565..cbe8b1397fa7249560f9502b9d57387bbfb1ddc0 100644 (file)
Binary files a/lib/tcom/tcominproc.dll and b/lib/tcom/tcominproc.dll differ
index e83568bb88e388471c176d765ecacb979198d8e8..e8b8fe39671bf7a7393581482ed61c477b1cd987 100644 (file)
Binary files a/lib/tcom/tcomlocal.exe and b/lib/tcom/tcomlocal.exe differ
index 73a055bc1dd8651371ac0fb8dffb5db553be2927..6631d4a0fd9e5193b9eb77e408349cce0d3599d9 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: Arguments.cpp 5 2005-02-16 14:57:24Z cthuang $
+// $Id: Arguments.cpp 20 2005-05-04 16:53:05Z cthuang $
 #include "Arguments.h"
 #include "Extension.h"
 #include "TclObject.h"
@@ -41,9 +41,8 @@ TypedArguments::initArgument (
         // This variant indicates a missing optional argument.
         m_args[argIndex] = vtMissing;
 
-    } else if (parameter.flags() & PARAMFLAG_FOUT) {
-        // For out parameters, set a pointer to where the out value
-        // will be stored.
+    } else if (parameter.type().pointerCount() > 0) {
+        // The argument is passed by reference.
 
         switch (vt) {
         case VT_INT:
@@ -80,19 +79,28 @@ TypedArguments::initArgument (
         }
 
         if (parameter.flags() & PARAMFLAG_FIN) {
-            // Set the value for an in/out parameter.
-            Tcl_Obj *pValue = Tcl_ObjGetVar2(
-                interp, pObj, NULL, TCL_LEAVE_ERR_MSG);
-            if (pValue == 0) {
-                return TCL_ERROR;
+            if (parameter.flags() & PARAMFLAG_FOUT) {
+                // Set the value for an in/out parameter.
+                Tcl_Obj *pValue = Tcl_ObjGetVar2(
+                    interp, pObj, NULL, TCL_LEAVE_ERR_MSG);
+                if (pValue == 0) {
+                    return TCL_ERROR;
+                }
+
+                TclObject value(pValue);
+
+                // If the argument is an interface pointer, increment its
+                // reference count because the _variant_t destructor will
+                // release it.
+                value.toNativeValue(
+                    &m_outValues[argIndex], parameter.type(), interp, true);
+            } else {
+                // If the argument is an interface pointer, increment its
+                // reference count because the _variant_t destructor will
+                // release it.
+                argument.toNativeValue(
+                    &m_outValues[argIndex], parameter.type(), interp, true);
             }
-
-            TclObject value(pValue);
-
-            // If the argument is an interface pointer, increment its reference
-            // count because the _variant_t destructor will release it.
-            value.toNativeValue(
-                &m_outValues[argIndex], parameter.type(), interp, true);
         } else {
             if (vt == VT_UNKNOWN) {
                 m_outValues[argIndex].vt = vt;