CopernicaMarketingSoftware/PHP-CPP — pull request #111 by andot (2014-07-10 05:31:51+00:00)
Title: Fixed make test on ubuntu i386 and Mac OS X.

When I run make test on ubuntu x86, or Mac OS X, it fails with the
following errors:
```
g++ -Wall -c -O2 -std=c++11 -fpic
-I"/home/andot/git/PHP-CPP/tests/include/lib"
-I"/home/andot/git/PHP-CPP/tests/include/zts" -o main.o main.cpp
In file included from h/variables.h:19:0,
from main.cpp:13:
h/../include/variables/011-012-value-casting-operators.h: In function
‘void TestVariables::value_casting(Php::Parameters&)’:
h/../include/variables/011-012-value-casting-operators.h:23:17: error:
conversion from ‘Php::Value’ to ‘long int’ is ambiguous
long value1 = value;
^
h/../include/variables/011-012-value-casting-operators.h:21:14: note:
candidates are:
Php::Value value = params[0];
^
In file included from
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp.h:36:0,
from main.cpp:8:
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:659:5: note:
Php::Value::operator double() const
operator double () const
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:650:5: note:
Php::Value::operator const char*() const
operator const char * () const
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:650:5: note:
no known conversion for implicit ‘this’ parameter from ‘const char*’ to
‘long int’
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:632:5: note:
Php::Value::operator bool() const
operator bool () const
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:623:5: note:
Php::Value::operator int64_t() const
operator int64_t () const
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:614:5: note:
Php::Value::operator int32_t() const
operator int32_t () const
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:605:5: note:
Php::Value::operator int16_t() const
operator int16_t () const
^
In file included from
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp.h:59:0,
from main.cpp:8:
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/class.h: In
instantiation of ‘Php::Value
Php::Class::callToInteger(Php::Base*) const [with T =
TestVariables::Obj2Scalar]’:
main.cpp:179:1: required from here
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/class.h:450:63: error:
call of overloaded ‘Value(long int)’ is ambiguous
return Value(obj->__toInteger()).setType(Type::Numeric);
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/class.h:450:63: note:
candidates are:
In file included from
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp.h:36:0,
from main.cpp:8:
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:133:5: note:
Php::Value::Value(Php::Value&&)
Value(Value &&that);
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:127:5: note:
Php::Value::Value(const Php::Value&)
Value(const Value &that);
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:121:5: note:
Php::Value::Value(const Php::Base*)
Value(const Base *base);
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:121:5: note:
no known conversion for argument 1 from ‘long int’ to ‘const Php::Base*’
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:115:5: note:
Php::Value::Value(_zval_struct*, bool)
Value(struct _zval_struct *zval, bool ref=false);
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:115:5: note:
no known conversion for argument 1 from ‘long int’ to ‘_zval_struct*’
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:61:5: note:
Php::Value::Value(double)
Value(double value);
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:60:5: note:
Php::Value::Value(const char*, int)
Value(const char *value, int size = -1);
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:60:5: note:
no known conversion for argument 1 from ‘long int’ to ‘const char*’
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:59:5: note:
Php::Value::Value(const string&)
Value(const std::string &value);
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:59:5: note:
no known conversion for argument 1 from ‘long int’ to ‘const string&
{aka const std::basic_string&}’
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:58:5: note:
Php::Value::Value(char)
Value(char value);
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:57:5: note:
Php::Value::Value(bool)
Value(bool value);
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:56:5: note:
Php::Value::Value(int64_t)
Value(int64_t value);
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:55:5: note:
Php::Value::Value(int32_t)
Value(int32_t value);
^
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/value.h:54:5: note:
Php::Value::Value(int16_t)
Value(int16_t value);
^
In file included from
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp.h:59:0,
from main.cpp:8:
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/class.h: In member
function ‘Php::Value Php::Class::callToInteger(Php::Base*)
const [with T = TestVariables::Obj2Scalar]’:
/home/andot/git/PHP-CPP/tests/include/lib/phpcpp/class.h:451:5: warning:
control reaches end of non-void function [-Wreturn-type]
}
^
```

This patch fixed it.