X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_object.h;h=c6bd17f58617a3a53266c5e3372f7b28a9e254e3;hp=a3786bbbedbf0e7c2547f5040c4242cbe59de8c5;hb=4a484375d696a2dbf19571c4ac2beb693f913b88;hpb=87db9817d428282792c8146d9c2ae9748ebf6f1e diff --git a/php_http_object.h b/php_http_object.h index a3786bb..c6bd17f 100644 --- a/php_http_object.h +++ b/php_http_object.h @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2013, Michael Wallner | + | Copyright (c) 2004-2014, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -14,17 +14,28 @@ #define PHP_HTTP_OBJECT_H typedef struct php_http_object { + void *intern; zend_object zo; - zend_object_value zv; } php_http_object_t; -zend_object_value php_http_object_new(zend_class_entry *ce TSRMLS_DC); -zend_object_value php_http_object_new_ex(zend_class_entry *ce, void *nothing, php_http_object_t **ptr TSRMLS_DC); +zend_object *php_http_object_new(zend_class_entry *ce TSRMLS_DC); +php_http_object_t *php_http_object_new_ex(zend_class_entry *ce, void *nothing); -typedef zend_object_value (*php_http_new_t)(zend_class_entry *ce, void *, void ** TSRMLS_DC); +typedef void *(*php_http_new_t)(zend_class_entry *ce, void *); -STATUS php_http_new(zend_object_value *ov, zend_class_entry *ce, php_http_new_t create, zend_class_entry *parent_ce, void *intern_ptr, void **obj_ptr TSRMLS_DC); -STATUS php_http_method_call(zval *object, const char *method_str, size_t method_len, int argc, zval **argv[], zval **retval_ptr TSRMLS_DC); +ZEND_RESULT_CODE php_http_new(void **obj_ptr, zend_class_entry *ce, php_http_new_t create, zend_class_entry *parent_ce, void *intern_ptr); + +PHP_MINIT_FUNCTION(http_object); + +typedef struct php_http_method { + zend_fcall_info fci; + zend_fcall_info_cache fcc; +} php_http_object_method_t; + +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); +ZEND_RESULT_CODE php_http_object_method_call(php_http_object_method_t *cb, zval *zobject, zval *retval, int argc, zval *args); +void php_http_object_method_dtor(php_http_object_method_t *cb); +void php_http_object_method_free(php_http_object_method_t **cb); #endif