diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-05-15 14:03:44 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-05-15 14:03:44 +0400 |
commit | f2324a3e0ea03667575e59d51c177b383d33d402 (patch) | |
tree | 809b5aaa23f5283e0fa05de8df96006d0b7bc5e2 /ext/xsl/php_xsl.h | |
parent | bc99c0debb568741c1242f73be06c782a485e3e8 (diff) | |
parent | a031ced63bc1c0318e3dd13950a380e8c8e6f34c (diff) | |
download | php-git-f2324a3e0ea03667575e59d51c177b383d33d402.tar.gz |
Merge branch 'phpng' of git.php.net:php-src into phpng
* 'phpng' of git.php.net:php-src:
Fixed two tests, 1 left
Refactored ext/xsl, need some help in 3 tests failed
Diffstat (limited to 'ext/xsl/php_xsl.h')
-rw-r--r-- | ext/xsl/php_xsl.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/ext/xsl/php_xsl.h b/ext/xsl/php_xsl.h index 1e054b348d..f6ad3712dc 100644 --- a/ext/xsl/php_xsl.h +++ b/ext/xsl/php_xsl.h @@ -54,10 +54,9 @@ extern zend_module_entry xsl_module_entry; #define XSL_SECPREF_DEFAULT 44 typedef struct _xsl_object { - zend_object std; void *ptr; HashTable *prop_handler; - zend_object_handle handle; + zval handle; HashTable *parameter; int hasKeys; int registerPhpFunctions; @@ -67,11 +66,18 @@ typedef struct _xsl_object { char *profiling; long securityPrefs; int securityPrefsSet; + zend_object std; } xsl_object; +static inline xsl_object *php_xsl_fetch_object(zend_object *obj) { + return (xsl_object *)((char*)(obj) - XtOffsetOf(xsl_object, std)); +} + +#define Z_XSL_P(zv) php_xsl_fetch_object(Z_OBJ_P((zv))) + void php_xsl_set_object(zval *wrapper, void *obj TSRMLS_DC); -void xsl_objects_free_storage(void *object TSRMLS_DC); -zval *php_xsl_create_object(xsltStylesheetPtr obj, int *found, zval *wrapper_in, zval *return_value TSRMLS_DC); +void xsl_objects_free_storage(zend_object *object TSRMLS_DC); +void php_xsl_create_object(xsltStylesheetPtr obj, zval *wrapper_in, zval *return_value TSRMLS_DC); void xsl_ext_function_string_php(xmlXPathParserContextPtr ctxt, int nargs); void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs); @@ -82,13 +88,13 @@ ce.create_object = xsl_objects_new; \ entry = zend_register_internal_class_ex(&ce, parent_ce TSRMLS_CC); #define XSL_DOMOBJ_NEW(zval, obj, ret) \ - if (NULL == (zval = php_xsl_create_object(obj, ret, zval, return_value TSRMLS_CC))) { \ + zval = php_xsl_create_object(obj, ret, zval, return_value TSRMLS_CC); \ + if (ZVAL_IS_NULL(zval)) { \ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create required DOM object"); \ RETURN_FALSE; \ } - PHP_MINIT_FUNCTION(xsl); PHP_MSHUTDOWN_FUNCTION(xsl); PHP_RINIT_FUNCTION(xsl); |