Author: byron
Date: Wed Feb  4 03:41:30 2009
New Revision: 740593

URL: http://svn.apache.org/viewvc?rev=740593&view=rev
Log:
Oops, reverse last checking, picked up stuff that shouldn't go in

Modified:
    
velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java

Modified: 
velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java?rev=740593&r1=740592&r2=740593&view=diff
==============================================================================
--- 
velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
 (original)
+++ 
velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
 Wed Feb  4 03:41:30 2009
@@ -57,12 +57,6 @@
     private boolean localContextScope = false;
     private int maxCallDepth;
     private String bodyReference;
-    
-    /**
-     * Set to true when the configuration indicates we are following pass by 
value
-     * Symentics for macro parameter passing.
-     */
-    private boolean passByValue = false;
 
     /**
      * Return name of this Velocimacro.
@@ -177,15 +171,7 @@
                  * This makes VMReferenceMungeVisitor obsolete and it would 
not work anyway 
                  * when the macro AST is shared
                  */
-                if (passByValue)
-                {
-                    vmc.addVMProxyArg(context, argArray[i], node.jjtGetChild(i 
- 1));
-                }
-                else
-                {
-                    vmc.addVMProxyArg(context, argArray[i], 
-                        literalArgArray[i], node.jjtGetChild(i - 1));
-                }
+                vmc.addVMProxyArg(context, argArray[i], literalArgArray[i], 
node.jjtGetChild(i - 1));
             }
         }
         
@@ -267,9 +253,6 @@
 
         // get name of the reference that refers to AST block passed to block 
macro call
         bodyReference = rsvc.getString(RuntimeConstants.VM_BODY_REFERENCE, 
"bodyContent");
-
-        // Are we configured for pass by value semantics when passing 
parameters
-        passByValue = rs.getBoolean(RuntimeConstants.VM_ARGUMENTS_PASSBYVALUE, 
false); 
     }
     
 
@@ -278,7 +261,7 @@
      */
     private String buildErrorMsg(Node node)
     {
-      int i = node.jjtGetNumChildren() - 1;  // the number of arguments this 
call provided
+      int i = node.jjtGetNumChildren();  // the number of arguments this call 
provided
       String msg = "VM #" + macroName + ": too "
         + ((getNumArgs() > i) ? "few" : "many") + " arguments to macro. Wanted 
"
         + getNumArgs() + " got " + i;      


Reply via email to