Skip to content

Commit

Permalink
Fixed makefile to refer to right /usr/ directory, and the operator()(…
Browse files Browse the repository at this point in the history
…) methods in Php::Value are now all const (they do not modify the variable after all)
  • Loading branch information
Evangelos Trantos authored and Evangelos Trantos committed Feb 26, 2014
1 parent 22a4772 commit 85349bb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PREFIX = /home/work/
INCLUDE_DIR = ${PREFIX}/include/
LIBRARY_DIR = ${PREFIX}/lib/
PREFIX = /usr
INCLUDE_DIR = ${PREFIX}/include
LIBRARY_DIR = ${PREFIX}/lib

all:
cd src; $(MAKE)
Expand Down
24 changes: 12 additions & 12 deletions include/value.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,17 +569,17 @@ class Value
* This call operator is only useful when the variable represents a callable
* @return Value
*/
Value operator()();
Value operator()(Value p0);
Value operator()(Value p0, Value p1);
Value operator()(Value p0, Value p1, Value p2);
Value operator()(Value p0, Value p1, Value p2, Value p3);
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4);
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5);
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6);
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7);
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7, Value p8);
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7, Value p8, Value p9);
Value operator()() const;
Value operator()(Value p0) const;
Value operator()(Value p0, Value p1) const;
Value operator()(Value p0, Value p1, Value p2) const;
Value operator()(Value p0, Value p1, Value p2, Value p3) const;
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4) const;
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5) const;
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6) const;
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7) const;
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7, Value p8) const;
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7, Value p8, Value p9) const;

/**
* Call a method
Expand Down Expand Up @@ -636,7 +636,7 @@ class Value
* @param argv The parameters
* @return Value
*/
Value exec(int argc, struct _zval_struct ***params);
Value exec(int argc, struct _zval_struct ***params) const;

/**
* Call method with a number of parameters
Expand Down
24 changes: 12 additions & 12 deletions src/value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ Value Value::operator%(double value) { return Value(numericValue(
* @param p0-p10 Parameters of the function to be called.
* @return Value
*/
Value Value::operator()()
Value Value::operator()() const
{
// call with zero parameters
return exec(0, NULL);
Expand All @@ -698,7 +698,7 @@ Value Value::operator()()
* @param p0 The first parameter
* @return Value
*/
Value Value::operator()(Value p0)
Value Value::operator()(Value p0) const
{
// array of parameters
zval **params[1] = { &p0._val };
Expand All @@ -713,7 +713,7 @@ Value Value::operator()(Value p0)
* @param p1 The second parameter
* @return Value
*/
Value Value::operator()(Value p0, Value p1)
Value Value::operator()(Value p0, Value p1) const
{
// array of parameters
zval **params[2] = { &p0._val, &p1._val };
Expand All @@ -729,7 +729,7 @@ Value Value::operator()(Value p0, Value p1)
* @param p2 The third parameter
* @return Value
*/
Value Value::operator()(Value p0, Value p1, Value p2)
Value Value::operator()(Value p0, Value p1, Value p2) const
{
// array of parameters
zval **params[3] = { &p0._val, &p1._val, &p2._val };
Expand All @@ -746,7 +746,7 @@ Value Value::operator()(Value p0, Value p1, Value p2)
* @param p3 The fourth parameter
* @return Value
*/
Value Value::operator()(Value p0, Value p1, Value p2, Value p3)
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 };
Expand All @@ -764,7 +764,7 @@ Value Value::operator()(Value p0, Value p1, Value p2, Value p3)
* @param p4 The fifth parameter
* @return Value
*/
Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4)
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 };
Expand All @@ -783,7 +783,7 @@ Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4)
* @param p5 The sixth parameter
* @return Value
*/
Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5)
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 };
Expand All @@ -803,7 +803,7 @@ Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value
* @param p6 The seventh parameter
* @return Value
*/
Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6)
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 };
Expand All @@ -824,7 +824,7 @@ Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value
* @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)
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 };
Expand All @@ -846,7 +846,7 @@ Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value
* @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)
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 };
Expand All @@ -869,7 +869,7 @@ Value Value::operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value
* @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)
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 };
Expand Down Expand Up @@ -1090,7 +1090,7 @@ Value Value::call(const std::string &name, Value p0, Value p1, Value p2, Value p
* @param argv The parameters
* @return Value
*/
Value Value::exec(int argc, zval ***params)
Value Value::exec(int argc, zval ***params) const
{
// the return zval
zval *retval = nullptr;
Expand Down

0 comments on commit 85349bb

Please sign in to comment.