summaryrefslogtreecommitdiff
path: root/zend
diff options
context:
space:
mode:
authorvalmat <ufabiz@gmail.com>2014-11-25 23:36:07 +0600
committervalmat <ufabiz@gmail.com>2014-11-25 23:36:07 +0600
commitcf25fa0b9636d232c63f01824d66289ab9a89b81 (patch)
treecdf0fae4bfca8497f7ba37c9d03516a9af38766c /zend
parentda4de6cb1097471b2659c102d55a646cbc9e0f41 (diff)
Used variadic templates instead of code duplication
Diffstat (limited to 'zend')
-rw-r--r--zend/value.cpp380
1 files changed, 0 insertions, 380 deletions
diff --git a/zend/value.cpp b/zend/value.cpp
index 501feb7..8d1e78f 100644
--- a/zend/value.cpp
+++ b/zend/value.cpp
@@ -851,191 +851,6 @@ Value Value::operator()() const
}
/**
- * Call the function - if the variable holds a callable thing
- * @param p0 The first parameter
- * @return Value
- */
-Value Value::operator()(Value p0) const
-{
- // array of parameters
- zval **params[1] = { &p0._val };
-
- // call the function
- return exec(1, params);
-}
-
-/**
- * Call the function - if the variable holds a callable thing
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @return Value
- */
-Value Value::operator()(Value p0, Value p1) const
-{
- // array of parameters
- zval **params[2] = { &p0._val, &p1._val };
-
- // call the function
- return exec(2, params);
-}
-
-/**
- * Call the function - if the variable holds a callable thing
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @return Value
- */
-Value Value::operator()(Value p0, Value p1, Value p2) const
-{
- // array of parameters
- zval **params[3] = { &p0._val, &p1._val, &p2._val };
-
- // call the function
- return exec(3, params);
-}
-
-/**
- * Call the function - if the variable holds a callable thing
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @return Value
- */
-Value Value::operator()(Value p0, Value p1, Value p2, Value p3) const
-{
- // array of parameters
- zval **params[4] = { &p0._val, &p1._val, &p2._val, &p3._val };
-
- // call the function
- return exec(4, params);
-}
-
-/**
- * Call the function - if the variable holds a callable thing
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @param p4 The fifth parameter
- * @return Value
- */
-Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4) const
-{
- // array of parameters
- zval **params[5] = { &p0._val, &p1._val, &p2._val, &p3._val, &p4._val };
-
- // call the function
- return exec(5, params);
-}
-
-/**
- * Call the function - if the variable holds a callable thing
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @param p4 The fifth parameter
- * @param p5 The sixth parameter
- * @return Value
- */
-Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5) const
-{
- // array of parameters
- zval **params[6] = { &p0._val, &p1._val, &p2._val, &p3._val, &p4._val, &p5._val };
-
- // call the function
- return exec(6, params);
-}
-
-/**
- * Call the function - if the variable holds a callable thing
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @param p4 The fifth parameter
- * @param p5 The sixth parameter
- * @param p6 The seventh parameter
- * @return Value
- */
-Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6) const
-{
- // array of parameters
- zval **params[7] = { &p0._val, &p1._val, &p2._val, &p3._val, &p4._val, &p5._val, &p6._val };
-
- // call the function
- return exec(7, params);
-}
-
-/**
- * Call the function - if the variable holds a callable thing
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @param p4 The fifth parameter
- * @param p5 The sixth parameter
- * @param p6 The seventh parameter
- * @param p7 The eighth parameter
- * @return Value
- */
-Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7) const
-{
- // array of parameters
- zval **params[8] = { &p0._val, &p1._val, &p2._val, &p3._val, &p4._val, &p5._val, &p6._val, &p7._val };
-
- // call the function
- return exec(8, params);
-}
-
-/**
- * Call the function - if the variable holds a callable thing
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @param p4 The fifth parameter
- * @param p5 The sixth parameter
- * @param p6 The seventh parameter
- * @param p7 The eighth parameter
- * @param p8 The ninth parameter
- * @return Value
- */
-Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7, Value p8) const
-{
- // array of parameters
- zval **params[9] = { &p0._val, &p1._val, &p2._val, &p3._val, &p4._val, &p5._val, &p6._val, &p7._val, &p8._val };
-
- // call the function
- return exec(9, params);
-}
-
-/**
- * Call the function - if the variable holds a callable thing
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @param p4 The fifth parameter
- * @param p5 The sixth parameter
- * @param p6 The seventh parameter
- * @param p7 The eighth parameter
- * @param p8 The ninth parameter
- * @param p9 The tenth parameter
- * @return Value
- */
-Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7, Value p8, Value p9) const
-{
- // array of parameters
- zval **params[10] = { &p0._val, &p1._val, &p2._val, &p3._val, &p4._val, &p5._val, &p6._val, &p7._val, &p8._val, &p9._val };
-
- // call the function
- return exec(10, params);
-}
-
-/**
* Call the method - if the variable holds an object with the given method
* @param name name of the method to call
* @return Value
@@ -1047,201 +862,6 @@ Value Value::call(const char *name)
}
/**
- * Call the method - if the variable holds an object with the given method
- * @param name name of the method to call
- * @param p0 The first parameter
- * @return Value
- */
-Value Value::call(const char *name, Value p0)
-{
- // array of parameters
- zval **params[] = { &p0._val };
-
- // call with zero parameters
- return exec(name, 1, params);
-}
-
-/**
- * Call the method - if the variable holds an object with the given method
- * @param name name of the method to call
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @return Value
- */
-Value Value::call(const char *name, Value p0, Value p1)
-{
- // array of parameters
- zval **params[] = { &p0._val, &p1._val };
-
- // call with zero parameters
- return exec(name, 2, params);
-}
-
-/**
- * Call the method - if the variable holds an object with the given method
- * @param name name of the method to call
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @return Value
- */
-Value Value::call(const char *name, Value p0, Value p1, Value p2)
-{
- // array of parameters
- zval **params[] = { &p0._val, &p1._val, &p2._val };
-
- // call with zero parameters
- return exec(name, 3, params);
-}
-
-/**
- * Call the method - if the variable holds an object with the given method
- * @param name name of the method to call
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @return Value
- */
-Value Value::call(const char *name, Value p0, Value p1, Value p2, Value p3)
-{
- // array of parameters
- zval **params[] = { &p0._val, &p1._val, &p2._val, &p3._val };
-
- // call with zero parameters
- return exec(name, 4, params);
-}
-
-/**
- * Call the method - if the variable holds an object with the given method
- * @param name name of the method to call
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @param p4 The fifth parameter
- * @return Value
- */
-Value Value::call(const char *name, Value p0, Value p1, Value p2, Value p3, Value p4)
-{
- // array of parameters
- zval **params[] = { &p0._val, &p1._val, &p2._val, &p3._val, &p4._val };
-
- // call with zero parameters
- return exec(name, 5, params);
-}
-
-/**
- * Call the method - if the variable holds an object with the given method
- * @param name name of the method to call
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @param p4 The fifth parameter
- * @param p5 The sixth parameter
- * @return Value
- */
-Value Value::call(const char *name, Value p0, Value p1, Value p2, Value p3, Value p4, Value p5)
-{
- // array of parameters
- zval **params[] = { &p0._val, &p1._val, &p2._val, &p3._val, &p4._val, &p5._val };
-
- // call with zero parameters
- return exec(name, 6, params);
-}
-
-/**
- * Call the method - if the variable holds an object with the given method
- * @param name name of the method to call
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @param p4 The fifth parameter
- * @param p5 The sixth parameter
- * @param p6 The seventh parameter
- * @return Value
- */
-Value Value::call(const char *name, Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6)
-{
- // array of parameters
- zval **params[] = { &p0._val, &p1._val, &p2._val, &p3._val, &p4._val, &p5._val, &p6._val };
-
- // call with zero parameters
- return exec(name, 7, params);
-}
-
-/**
- * Call the method - if the variable holds an object with the given method
- * @param name name of the method to call
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @param p4 The fifth parameter
- * @param p5 The sixth parameter
- * @param p6 The seventh parameter
- * @param p7 The eighth parameter
- * @return Value
- */
-Value Value::call(const char *name, Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7)
-{
- // array of parameters
- zval **params[] = { &p0._val, &p1._val, &p2._val, &p3._val, &p4._val, &p5._val, &p6._val, &p7._val };
-
- // call with zero parameters
- return exec(name, 8, params);
-}
-
-/**
- * Call the method - if the variable holds an object with the given method
- * @param name name of the method to call
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @param p4 The fifth parameter
- * @param p5 The sixth parameter
- * @param p6 The seventh parameter
- * @param p7 The eighth parameter
- * @param p8 The ninth parameter
- * @return Value
- */
-Value Value::call(const char *name, Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7, Value p8)
-{
- // array of parameters
- zval **params[] = { &p0._val, &p1._val, &p2._val, &p3._val, &p4._val, &p5._val, &p6._val, &p7._val, &p8._val };
-
- // call with zero parameters
- return exec(name, 9, params);
-}
-
-/**
- * Call the method - if the variable holds an object with the given method
- * @param name name of the method to call
- * @param p0 The first parameter
- * @param p1 The second parameter
- * @param p2 The third parameter
- * @param p3 The fourth parameter
- * @param p4 The fifth parameter
- * @param p5 The sixth parameter
- * @param p6 The seventh parameter
- * @param p7 The eighth parameter
- * @param p8 The ninth parameter
- * @param p9 The tenth parameter
- * @return Value
- */
-Value Value::call(const char *name, Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7, Value p8, Value p9)
-{
- // array of parameters
- zval **params[] = { &p0._val, &p1._val, &p2._val, &p3._val, &p4._val, &p5._val, &p6._val, &p7._val, &p8._val, &p9._val };
-
- // call with zero parameters
- return exec(name, 10, params);
-}
-
-/**
* Helper function that runs the actual call
* @param object The object to call it on
* @param method The function or method to call