+ZEND_RESULT_CODE php_http_message_object_init_body_object(php_http_message_object_t *obj, zval *tmp_body)
+{
+ php_http_new_t ctor = (php_http_new_t) php_http_message_body_object_new_ex;
+ php_http_message_body_object_t *body_obj;
+
+ if (SUCCESS == php_http_new((void *) &body_obj, php_http_message_body_class_entry, ctor, NULL, obj->message->body)) {
+ zval tmp;
+
+ if (!tmp_body) {
+ tmp_body = &tmp;
+ }
+
+ //php_http_message_body_addref(obj->message->body);
+ ZVAL_OBJ(tmp_body, &body_obj->zo);
+ php_http_message_object_set_property(obj, ZEND_STRL("body"), tmp_body);
+
+ if (tmp_body == &tmp) {
+ zval_ptr_dtor(tmp_body);
+ }
+
+ return SUCCESS;
+ }
+
+ return FAILURE;
+}
+
+void php_http_message_object_set_parent_message(php_http_message_object_t *obj, php_http_message_t *msg)
+{
+ while (msg) {
+ zval tmp_parent_obj;
+ php_http_message_object_t *parent_obj = php_http_message_object_new_ex(obj->zo.ce, msg->parent);
+
+ ZVAL_OBJ(&tmp_parent_obj, &parent_obj->zo);
+ php_http_message_object_set_property(obj, ZEND_STRL("parentMessage"), &tmp_parent_obj);
+ zval_ptr_dtor(&tmp_parent_obj);
+
+ msg = msg->parent;
+ obj = parent_obj;
+ }
+}
+
+void php_http_message_object_set_message(php_http_message_object_t *obj, php_http_message_t *msg)