[Kde-bindings] playground/bindings/phpqt/php_qt
Thomas Moenicke
tm at php-qt.org
Sun Jul 1 12:48:09 UTC 2007
SVN commit 682041 by moenicke:
* memory allocation for primitives in virtual method calls
CCMAIL: kde-bindings at kde.org
M +4 -0 marshall_basetypes.h
M +2 -2 marshall_primitives.h
--- trunk/playground/bindings/phpqt/php_qt/marshall_basetypes.h #682040:682041
@@ -51,6 +51,10 @@
template <class T>
static void marshall_to_php(Marshall *m)
{
+ if(m->doAlloc()){
+ zval* z = (zval*) emalloc(sizeof(zval*));
+ m->var(z);
+ }
*(m->var()) = *primitive_to_php<T>( *smoke_ptr<T>(m) , m->var());
}
--- trunk/playground/bindings/phpqt/php_qt/marshall_primitives.h #682040:682041
@@ -97,8 +97,8 @@
template <>
static zval* primitive_to_php<int>(int sv, zval* return_value)
{
- RETVAL_LONG(sv);
- return return_value;
+ RETVAL_LONG(sv);
+ return return_value;
}
template <>
More information about the Kde-bindings
mailing list