[Kde-bindings] KDE/kdebindings/php/phpqt/src
Thomas Moenicke
tm at php-qt.org
Wed Jul 16 14:48:00 UTC 2008
SVN commit 833258 by moenicke:
* made marshaller methods nonstatic
CCMAIL: kde-bindings at kde.org
M +34 -34 marshall_primitives.h
--- trunk/KDE/kdebindings/php/phpqt/src/marshall_primitives.h #833257:833258
@@ -10,7 +10,7 @@
// TODO catch more types, see php_to_primitive<long>
template <>
-static bool php_to_primitive<bool>(zval* v)
+bool php_to_primitive<bool>(zval* v)
{
if (v->type == IS_OBJECT) {
// A Qt::Boolean has been passed as a value
@@ -21,64 +21,64 @@
}
template <>
-static zval* primitive_to_php<bool>(bool sv, zval* return_value)
+zval* primitive_to_php<bool>(bool sv, zval* return_value)
{
RETVAL_BOOL(sv);
return return_value;
}
template <>
-static signed char php_to_primitive<signed char>(zval* v)
+signed char php_to_primitive<signed char>(zval* v)
{
return v->value.str.val[0];
}
template <>
-static zval* primitive_to_php<signed char>(signed char sv, zval* return_value)
+zval* primitive_to_php<signed char>(signed char sv, zval* return_value)
{
php_error(E_ERROR,"signed char not implemented");
}
template <>
-static unsigned char php_to_primitive<unsigned char>(zval* v)
+unsigned char php_to_primitive<unsigned char>(zval* v)
{
return v->value.str.val[0];
}
template <>
-static zval* primitive_to_php<unsigned char>(unsigned char sv, zval* return_value)
+zval* primitive_to_php<unsigned char>(unsigned char sv, zval* return_value)
{
php_error(E_ERROR,"unsigned char not implemented");
}
template <>
-static short php_to_primitive<short>(zval* v)
+short php_to_primitive<short>(zval* v)
{
return Z_LVAL_P(v);
}
template <>
-static zval* primitive_to_php<short>(short sv, zval* return_value)
+zval* primitive_to_php<short>(short sv, zval* return_value)
{
RETVAL_LONG(sv);
return return_value;
}
template <>
-static unsigned short php_to_primitive<unsigned short>(zval* v)
+unsigned short php_to_primitive<unsigned short>(zval* v)
{
return Z_LVAL_P(v);
}
template <>
-static zval* primitive_to_php<unsigned short>(unsigned short sv, zval* return_value)
+zval* primitive_to_php<unsigned short>(unsigned short sv, zval* return_value)
{
RETVAL_LONG(sv);
return return_value;
}
template <>
-static int php_to_primitive<int>(zval* v)
+int php_to_primitive<int>(zval* v)
{
if (v->type == IS_OBJECT) {
php_error(E_WARNING,"An object has been passed, but integer expected.");
@@ -95,14 +95,14 @@
}
template <>
-static zval* primitive_to_php<int>(int sv, zval* return_value)
+zval* primitive_to_php<int>(int sv, zval* return_value)
{
RETVAL_LONG(sv);
return return_value;
}
template <>
-static unsigned int php_to_primitive<unsigned int>(zval* v)
+unsigned int php_to_primitive<unsigned int>(zval* v)
{
if (v->type == IS_OBJECT) {
php_error(E_WARNING,"An unsigned integer has been passed as an object");
@@ -112,14 +112,14 @@
}
template <>
-static zval* primitive_to_php<unsigned int>(unsigned int sv, zval* return_value)
+zval* primitive_to_php<unsigned int>(unsigned int sv, zval* return_value)
{
RETVAL_LONG(sv);
return return_value;
}
template <>
-static long php_to_primitive<long>(zval* v)
+long php_to_primitive<long>(zval* v)
{
if (v->type == IS_OBJECT) {
php_error(E_WARNING,"A long has been passed as an object");
@@ -129,14 +129,14 @@
}
template <>
-static zval* primitive_to_php<long>(long sv, zval* return_value)
+zval* primitive_to_php<long>(long sv, zval* return_value)
{
RETVAL_LONG(sv);
return return_value;
}
template <>
-static unsigned long php_to_primitive<unsigned long>(zval* v)
+unsigned long php_to_primitive<unsigned long>(zval* v)
{
if (v->type == IS_OBJECT) {
php_error(E_WARNING,"An unsigned long has been passed as an object");
@@ -146,53 +146,53 @@
}
template <>
-static zval* primitive_to_php<unsigned long>(unsigned long sv, zval* return_value)
+zval* primitive_to_php<unsigned long>(unsigned long sv, zval* return_value)
{
RETVAL_LONG(sv);
return return_value;
}
template <>
-static long long php_to_primitive<long long>(zval* v)
+long long php_to_primitive<long long>(zval* v)
{
return Z_LVAL_P(v);
}
template <>
-static zval* primitive_to_php<long long>(long long sv, zval* return_value)
+zval* primitive_to_php<long long>(long long sv, zval* return_value)
{
RETVAL_LONG(sv);
return return_value;
}
template <>
-static unsigned long long php_to_primitive<unsigned long long>(zval* v)
+unsigned long long php_to_primitive<unsigned long long>(zval* v)
{
return Z_LVAL_P(v);
}
template <>
-static zval* primitive_to_php<unsigned long long>(unsigned long long sv, zval* return_value)
+zval* primitive_to_php<unsigned long long>(unsigned long long sv, zval* return_value)
{
RETVAL_LONG(sv);
return return_value;
}
template <>
-static float php_to_primitive<float>(zval* v)
+float php_to_primitive<float>(zval* v)
{
return Z_DVAL_P(v);
}
template <>
-static zval* primitive_to_php<float>(float sv, zval* return_value)
+zval* primitive_to_php<float>(float sv, zval* return_value)
{
RETVAL_DOUBLE(sv);
return return_value;
}
template <>
-static double php_to_primitive<double>(zval* v)
+double php_to_primitive<double>(zval* v)
{
if (v->type == IS_LONG){
return Z_LVAL_P(v);
@@ -204,25 +204,25 @@
}
template <>
-static zval* primitive_to_php<double>(double sv, zval* return_value)
+zval* primitive_to_php<double>(double sv, zval* return_value)
{
RETVAL_DOUBLE(sv);
return return_value;
}
template <>
-static char* php_to_primitive<char *>(zval* rv)
+char* php_to_primitive<char *>(zval* rv)
{
if(rv == Qnil)
return 0;
QByteArray* b = new QByteArray(rv->value.str.val);
return b->data();
-
+
}
template <>
-static unsigned char* php_to_primitive<unsigned char *>(zval* rv)
+unsigned char* php_to_primitive<unsigned char *>(zval* rv)
{
if(rv == Qnil)
return 0;
@@ -235,7 +235,7 @@
}
template <>
-static zval* primitive_to_php<int*>(int* sv, zval* return_value)
+zval* primitive_to_php<int*>(int* sv, zval* return_value)
{
if(!sv) {
return Qnil;
@@ -246,7 +246,7 @@
#if defined(Q_OS_WIN32)
template <>
-static WId php_to_primitive<WId>(zval* v)
+WId php_to_primitive<WId>(zval* v)
{
if(v == Qnil)
return 0;
@@ -255,14 +255,14 @@
}
template <>
-static zval* primitive_to_php<WId>(WId sv, zval* return_value)
+zval* primitive_to_php<WId>(WId sv, zval* return_value)
{
RETVAL_LONG((unsigned long) sv);
return return_value;
}
template <>
-static Q_PID php_to_primitive<Q_PID>(zval* v)
+Q_PID php_to_primitive<Q_PID>(zval* v)
{
if(v == Qnil)
return 0;
@@ -271,7 +271,7 @@
}
template <>
-static zval* primitive_to_php<Q_PID>(Q_PID sv, zval* return_value)
+zval* primitive_to_php<Q_PID>(Q_PID sv, zval* return_value)
{
RETVAL_LONG((unsigned long) sv);
return return_value;
More information about the Kde-bindings
mailing list