-STATUS php_http_method_call(zval *object, const char *method_str, size_t method_len, int argc, zval **argv[], zval **retval_ptr TSRMLS_DC)
+php_http_object_method_t *php_http_object_method_init(php_http_object_method_t *cb, zval *zobject, const char *method_str, size_t method_len TSRMLS_DC)
+{
+ zval *zfn;
+
+ if (!cb) {
+ cb = ecalloc(1, sizeof(*cb));
+ } else {
+ memset(cb, 0, sizeof(*cb));
+ }
+
+ MAKE_STD_ZVAL(zfn);
+ ZVAL_STRINGL(zfn, method_str, method_len, 1);
+
+ cb->fci.size = sizeof(cb->fci);
+ cb->fci.function_name = zfn;
+ cb->fcc.initialized = 1;
+ cb->fcc.calling_scope = cb->fcc.called_scope = Z_OBJCE_P(zobject);
+ cb->fcc.function_handler = Z_OBJ_HT_P(zobject)->get_method(&zobject, Z_STRVAL_P(cb->fci.function_name), Z_STRLEN_P(cb->fci.function_name), NULL TSRMLS_CC);
+
+ return cb;
+}
+
+void php_http_object_method_dtor(php_http_object_method_t *cb)
+{
+ if (cb->fci.function_name) {
+ zval_ptr_dtor(&cb->fci.function_name);
+ cb->fci.function_name = NULL;
+ }
+}
+
+void php_http_object_method_free(php_http_object_method_t **cb)
+{
+ if (*cb) {
+ php_http_object_method_dtor(*cb);
+ efree(*cb);
+ *cb = NULL;
+ }
+}
+
+STATUS php_http_object_method_call(php_http_object_method_t *cb, zval *zobject, zval **retval_ptr, int argc, zval ***args TSRMLS_DC)