>not bound together in any way. You may be able to accomplish what you
>desire by using references. (See the manual section on references for more
>information.
> ie. $q->data[0]["id"] =& $q->data[0][0];
After looking for references in the php-code, I found something that seems
to work ok (zend_assign_to_variable_reference):
zval *dummy, *value, **x_ptr, **y_ptr;
MAKE_STD_ZVAL(value);
ZVAL_LONG(value, 10);
ALLOC_ZVAL(dummy);
INIT_ZVAL(*dummy);
zend_hash_update(return_value->value.obj.properties, "x", sizeof("x"),
&value, sizeof(zval *), (void **) &x_ptr);
zend_hash_update(return_value->value.obj.properties, "y", sizeof("y"),
&dummy, sizeof(zval *), (void **) &y_ptr);
zend_assign_to_variable_reference(NULL, y_ptr, x_ptr, NULL ELS_CC);
This leads me to another question: how do I obtain the x_ptr (from the
example) if the zend_hash_update was done elsewhere and no ptr was passed
then???
zend_hash_update(return_value->value.obj.properties, "x", sizeof("x"),
&value, sizeof(zval *), NULL);
[...]
// How do I get the x_ptr ???
zend_hash_update(return_value->value.obj.properties, "y", sizeof("y"),
&dummy, sizeof(zval *), (void **) &y_ptr);
zend_assign_to_variable_reference(NULL, y_ptr, x_ptr, NULL ELS_CC);
Cheerio, Marc.
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]