summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-28 16:57:52 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-28 16:57:52 +0200
commitd69d5ca8f8f6a8c75099052f8541d7144385572c (patch)
tree0f11daa9413f8203c64def24dd43a6bb79683d4e /src
parent06f99dc74625d1ce338abda0ab6e0b0194bf48b8 (diff)
fix compile issues
Diffstat (limited to 'src')
-rw-r--r--src/callable.h3
-rw-r--r--src/value.cpp20
2 files changed, 8 insertions, 15 deletions
diff --git a/src/callable.h b/src/callable.h
index 8bce37e..893dcdb 100644
--- a/src/callable.h
+++ b/src/callable.h
@@ -108,9 +108,6 @@ public:
*/
int invoke(INTERNAL_FUNCTION_PARAMETERS);
-
-int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used TSRMLS_DC
-
private:
/**
* Classname
diff --git a/src/value.cpp b/src/value.cpp
index a682dca..6ba67a4 100644
--- a/src/value.cpp
+++ b/src/value.cpp
@@ -95,7 +95,7 @@ Value::Value(struct _zval_struct *zval)
_val = zval;
// we see ourselves as reference too
- ZVAL_ADDREF_P(_val);
+ Z_ADDREF_P(_val);
}
/**
@@ -108,7 +108,7 @@ Value::Value(const Value &that)
_val = that._val;
// and we have one more reference
- ZVAL_ADDREF_P(_val);
+ Z_ADDREF_P(_val);
}
/**
@@ -118,7 +118,7 @@ Value::~Value()
{
// destruct the zval (this function will decrement the reference counter,
// and only destruct if there are no other references left)
- zval_ptr_dtor(_val);
+ zval_ptr_dtor(&_val);
}
/**
@@ -133,13 +133,13 @@ Value &Value::operator=(const Value &value)
// destruct the zval (this function will decrement the reference counter,
// and only destruct if there are no other references left)
- zval_ptr_dtor(_val);
+ zval_ptr_dtor(&_val);
// just copy the zval, and the refcounter
- _val = that._val;
+ _val = value._val;
// and we have one more reference
- ZVAL_ADDREF_P(_val);
+ Z_ADDREF_P(_val);
// done
return *this;
@@ -248,14 +248,10 @@ void Value::setType(Type type)
case nullType: convert_to_null(_val); break;
case intType: convert_to_long(_val); break;
case decimalType: convert_to_double(_val); break;
- case boolType: convert_to_bool(_val); break;
+ case boolType: convert_to_boolean(_val); break;
case arrayType: convert_to_array(_val); break;
case objectType: convert_to_object(_val); break;
case stringType: convert_to_string(_val); break;
- case resourceType: convert_to_resource(_val); break;
- case constantType: convert_to_constant(_val); break;
- case constantArrayType: convert_to_constant_array(_val); break;
- case callableType: convert_to_callable(_val); break;
}
}
@@ -367,7 +363,7 @@ bool Value::boolValue()
std::string Value::stringValue()
{
// already a string?
- if (isString()) return std::string(Z_STRVAL_P(_val), Z_STRLEN_T(_val));
+ if (isString()) return std::string(Z_STRVAL_P(_val), Z_STRLEN_P(_val));
// make a copy
Value copy(*this);