#define DOM_RET_OBJ(obj, ret, domobject) \
*ret = php_dom_create_object(obj, return_value, domobject)
-#define DOM_GET_THIS(zval) \
- do { zval = ZEND_THIS; } while (0)
-
#define DOM_GET_THIS_OBJ(__ptr, __id, __prtype, __intern) \
- DOM_GET_THIS(__id); \
+ __id = ZEND_THIS; \
DOM_GET_OBJ(__ptr, __id, __prtype, __intern);
#endif
/* {{{ proto void dom_xpath_register_php_functions() */
PHP_METHOD(domxpath, registerPhpFunctions)
{
- zval *id;
+ zval *id = ZEND_THIS;
dom_xpath_object *intern;
zval *array_value, *entry, new_string;
zend_string *name;
- DOM_GET_THIS(id);
-
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "a", &array_value) == SUCCESS) {
intern = Z_XPATHOBJ_P(id);
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(array_value), entry) {
PHP_FUNCTION(xsl_xsltprocessor_set_parameter)
{
- zval *id;
+ zval *id = ZEND_THIS;
zval *array_value, *entry, new_string;
xsl_object *intern;
char *namespace;
size_t namespace_len;
zend_string *string_key, *name, *value;
- DOM_GET_THIS(id);
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "sa", &namespace, &namespace_len, &array_value) == SUCCESS) {
intern = Z_XSL_P(id);
*/
PHP_FUNCTION(xsl_xsltprocessor_get_parameter)
{
- zval *id;
+ zval *id = ZEND_THIS;
char *namespace;
size_t namespace_len = 0;
zval *value;
zend_string *name;
xsl_object *intern;
- DOM_GET_THIS(id);
-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS", &namespace, &namespace_len, &name) == FAILURE) {
RETURN_THROWS();
}
*/
PHP_FUNCTION(xsl_xsltprocessor_remove_parameter)
{
- zval *id;
+ zval *id = ZEND_THIS;
size_t namespace_len = 0;
char *namespace;
zend_string *name;
xsl_object *intern;
- DOM_GET_THIS(id);
-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS", &namespace, &namespace_len, &name) == FAILURE) {
RETURN_THROWS();
}
*/
PHP_FUNCTION(xsl_xsltprocessor_register_php_functions)
{
- zval *id;
+ zval *id = ZEND_THIS;
xsl_object *intern;
zval *array_value, *entry, new_string;
zend_string *name;
- DOM_GET_THIS(id);
-
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "a", &array_value) == SUCCESS) {
intern = Z_XSL_P(id);
/* {{{ proto bool xsl_xsltprocessor_set_profiling(string filename) */
PHP_FUNCTION(xsl_xsltprocessor_set_profiling)
{
- zval *id;
+ zval *id = ZEND_THIS;
xsl_object *intern;
char *filename = NULL;
size_t filename_len;
- DOM_GET_THIS(id);
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "p!", &filename, &filename_len) == SUCCESS) {
intern = Z_XSL_P(id);
/* {{{ proto int xsl_xsltprocessor_set_security_prefs(int securityPrefs) */
PHP_FUNCTION(xsl_xsltprocessor_set_security_prefs)
{
- zval *id;
+ zval *id = ZEND_THIS;
xsl_object *intern;
zend_long securityPrefs, oldSecurityPrefs;
- DOM_GET_THIS(id);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &securityPrefs) == FAILURE) {
RETURN_THROWS();
}
/* {{{ proto int xsl_xsltprocessor_get_security_prefs() */
PHP_FUNCTION(xsl_xsltprocessor_get_security_prefs)
{
- zval *id;
+ zval *id = ZEND_THIS;
xsl_object *intern;
- DOM_GET_THIS(id);
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "") == SUCCESS) {
intern = Z_XSL_P(id);
RETURN_LONG(intern->securityPrefs);