diff options
author | Stanley Sufficool <ssufficool@php.net> | 2014-10-20 21:33:32 -0700 |
---|---|---|
committer | Stanley Sufficool <ssufficool@php.net> | 2014-10-20 21:33:32 -0700 |
commit | 8defcb855ab01d9c8ab4759cb793d80149b55a8c (patch) | |
tree | ed51eb30a2cbc92b102557498fb3e4113da1bb07 /ext/xsl/php_xsl.h | |
parent | 9c7dbb0487f5991fde03873ea8f5e66d6688415f (diff) | |
parent | baddb1c73a170ef1d2c31bd54cddbc6e1ab596b9 (diff) | |
download | php-git-8defcb855ab01d9c8ab4759cb793d80149b55a8c.tar.gz |
Merge branch 'master' of https://git.php.net/push/php-src
* 'master' of https://git.php.net/push/php-src: (6215 commits)
Extra comma
Moved proxy object support in ASSIGN_ADD (and family) from VM to slow paths of corresponding operators
Simplification
zend_get_property_info_quick() cleanup and optimization
initialize lineno before calling compile file file in phar
Use ADDREF instead of DUP, it must be enough.
Removed old irrelevant comment
fixed compilation error
Fix bug #68262: Broken reference across cloned objects
export functions needed for phpdbg
Fixed compilation
Optimized property access handlers. Removed EG(std_property_info).
Fixed bug #68199 (PDO::pgsqlGetNotify doesn't support NOTIFY payloads)
Don't make difference between undefined and unaccessible properies when call __get() and family
Don't make useless CSE
array_pop/array_shift optimization
check for zlib headers as well as lib for mysqlnd
a realpath cache key can be int or float, catching this
News entry for new curl constants
News entry for new curl constants
...
Diffstat (limited to 'ext/xsl/php_xsl.h')
-rw-r--r-- | ext/xsl/php_xsl.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/ext/xsl/php_xsl.h b/ext/xsl/php_xsl.h index e1a792e84b..b6603321a3 100644 --- a/ext/xsl/php_xsl.h +++ b/ext/xsl/php_xsl.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 5 | + | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2013 The PHP Group | + | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -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; @@ -65,13 +64,20 @@ typedef struct _xsl_object { HashTable *node_list; php_libxml_node_object *doc; char *profiling; - long securityPrefs; + zend_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); @@ -79,16 +85,16 @@ void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs); #define REGISTER_XSL_CLASS(ce, name, parent_ce, funcs, entry) \ INIT_CLASS_ENTRY(ce, name, funcs); \ ce.create_object = xsl_objects_new; \ -entry = zend_register_internal_class_ex(&ce, parent_ce, NULL TSRMLS_CC); +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); |