helly Tue May 9 23:58:46 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/tidy tidy.c /php-src/ext/soap soap.c /php-src/ext/simplexml simplexml.c /php-src/ext/reflection php_reflection.c /php-src/ext/mysqli mysqli_driver.c mysqli.c /php-src/ext/mysql php_mysql.c Log: - Update after api changes
http://cvs.php.net/viewcvs.cgi/php-src/ext/tidy/tidy.c?r1=1.66.2.8&r2=1.66.2.8.2.1&diff_format=u Index: php-src/ext/tidy/tidy.c diff -u php-src/ext/tidy/tidy.c:1.66.2.8 php-src/ext/tidy/tidy.c:1.66.2.8.2.1 --- php-src/ext/tidy/tidy.c:1.66.2.8 Wed Apr 19 21:47:20 2006 +++ php-src/ext/tidy/tidy.c Tue May 9 23:58:46 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tidy.c,v 1.66.2.8 2006/04/19 21:47:20 nlopess Exp $ */ +/* $Id: tidy.c,v 1.66.2.8.2.1 2006/05/09 23:58:46 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -223,8 +223,8 @@ static zend_class_entry *tidy_get_ce_node(zval * TSRMLS_DC); static zend_class_entry *tidy_get_ce_doc(zval * TSRMLS_DC); static zval * tidy_instanciate(zend_class_entry *, zval * TSRMLS_DC); -static int tidy_doc_cast_handler(zval *, zval *, int, int TSRMLS_DC); -static int tidy_node_cast_handler(zval *, zval *, int, int TSRMLS_DC); +static int tidy_doc_cast_handler(zval *, zval *, int TSRMLS_DC); +static int tidy_node_cast_handler(zval *, zval *, int TSRMLS_DC); static void tidy_doc_update_properties(PHPTidyObj * TSRMLS_DC); static void tidy_add_default_properties(PHPTidyObj *, tidy_obj_type TSRMLS_DC); static void *php_tidy_get_opt_val(PHPTidyDoc *, TidyOption, TidyOptionType * TSRMLS_DC); @@ -668,7 +668,7 @@ return object; } -static int tidy_doc_cast_handler(zval *in, zval *out, int type, int free TSRMLS_DC) +static int tidy_doc_cast_handler(zval *in, zval *out, int type TSRMLS_DC) { TidyBuffer output = {0}; PHPTidyObj *obj; @@ -700,7 +700,7 @@ return SUCCESS; } -static int tidy_node_cast_handler(zval *in, zval *out, int type, int free TSRMLS_DC) +static int tidy_node_cast_handler(zval *in, zval *out, int type TSRMLS_DC) { TidyBuffer buf = {0}; PHPTidyObj *obj; @@ -1005,7 +1005,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Tidy support", "enabled"); php_info_print_table_row(2, "libTidy Release", (char *)tidyReleaseDate()); - php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.66.2.8 2006/04/19 21:47:20 nlopess Exp $)"); + php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.66.2.8.2.1 2006/05/09 23:58:46 helly Exp $)"); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); http://cvs.php.net/viewcvs.cgi/php-src/ext/soap/soap.c?r1=1.156.2.28&r2=1.156.2.28.2.1&diff_format=u Index: php-src/ext/soap/soap.c diff -u php-src/ext/soap/soap.c:1.156.2.28 php-src/ext/soap/soap.c:1.156.2.28.2.1 --- php-src/ext/soap/soap.c:1.156.2.28 Wed May 3 06:36:02 2006 +++ php-src/ext/soap/soap.c Tue May 9 23:58:46 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: soap.c,v 1.156.2.28 2006/05/03 06:36:02 dmitry Exp $ */ +/* $Id: soap.c,v 1.156.2.28.2.1 2006/05/09 23:58:46 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -278,11 +278,7 @@ /* SoapHeader Functions */ PHP_METHOD(SoapHeader, SoapHeader); -#ifdef ZEND_ENGINE_2 -#define SOAP_CTOR(class_name, func_name, arginfo, flags) ZEND_FENTRY(__construct, ZEND_FN(class_name##_##func_name), arginfo, flags) -#else #define SOAP_CTOR(class_name, func_name, arginfo, flags) PHP_ME(class_name, func_name, arginfo, flags) -#endif static zend_function_entry soap_functions[] = { #ifdef HAVE_PHP_DOMXML @@ -337,11 +333,7 @@ static zend_function_entry soap_client_functions[] = { SOAP_CTOR(SoapClient, SoapClient, NULL, 0) PHP_ME(SoapClient, __call, __call_args, 0) -#ifdef ZEND_ENGINE_2 - ZEND_FENTRY(__soapCall, ZEND_FN(SoapClient___call), __soap_call_args, 0) -#else - ZEND_NAMED_FE(__soapCall, ZEND_FN(SoapClient___call), __soap_call_args) -#endif + ZEND_NAMED_ME(__soapCall, ZEND_MN(SoapClient___call), __soap_call_args, 0) PHP_ME(SoapClient, __getLastRequest, NULL, 0) PHP_ME(SoapClient, __getLastResponse, NULL, 0) PHP_ME(SoapClient, __getLastRequestHeaders, NULL, 0) @@ -546,7 +538,7 @@ zend_internal_function fe; fe.type = ZEND_INTERNAL_FUNCTION; - fe.handler = ZEND_FN(SoapClient___call); + fe.handler = ZEND_MN(SoapClient___call); fe.function_name = NULL; fe.scope = NULL; fe.fn_flags = 0; @@ -575,7 +567,7 @@ /* Register SoapFault class */ INIT_CLASS_ENTRY(ce, PHP_SOAP_FAULT_CLASSNAME, soap_fault_functions); #ifdef ZEND_ENGINE_2 - soap_fault_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC); + soap_fault_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); #else soap_fault_class_entry = zend_register_internal_class(&ce TSRMLS_CC); #endif @@ -3055,7 +3047,7 @@ if (fault_string != NULL) { add_property_string(obj, "faultstring", fault_string, 1); #ifdef ZEND_ENGINE_2 - zend_update_property_string(zend_exception_get_default(), obj, "message", sizeof("message")-1, fault_string TSRMLS_CC); + zend_update_property_string(zend_exception_get_default(TSRMLS_C), obj, "message", sizeof("message")-1, fault_string TSRMLS_CC); #endif } if (fault_code != NULL) { http://cvs.php.net/viewcvs.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22&r2=1.151.2.22.2.1&diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22 php-src/ext/simplexml/simplexml.c:1.151.2.22.2.1 --- php-src/ext/simplexml/simplexml.c:1.151.2.22 Fri Apr 14 15:19:45 2006 +++ php-src/ext/simplexml/simplexml.c Tue May 9 23:58:46 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simplexml.c,v 1.151.2.22 2006/04/14 15:19:45 helly Exp $ */ +/* $Id: simplexml.c,v 1.151.2.22.2.1 2006/05/09 23:58:46 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1567,7 +1567,7 @@ /* {{{ sxe_object_cast() */ -static int sxe_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC) +static int sxe_object_cast(zval *readobj, zval *writeobj, int type TSRMLS_DC) { php_sxe_object *sxe; char *contents = NULL; @@ -1579,9 +1579,6 @@ if (type == IS_BOOL) { node = php_sxe_get_first_node(sxe, NULL TSRMLS_CC); empty = node == NULL && zend_hash_num_elements(sxe_properties_get(readobj TSRMLS_CC)) == 0; - if (should_free) { - zval_dtor(readobj); - } INIT_PZVAL(writeobj); ZVAL_BOOL(writeobj, !empty); return SUCCESS; @@ -1606,10 +1603,6 @@ } } - if (should_free) { - zval_dtor(readobj); - } - rv = cast_object(writeobj, type, contents TSRMLS_CC); if (contents) { @@ -1655,7 +1648,7 @@ MAKE_STD_ZVAL(retval); - if (sxe_object_cast(z, retval, IS_STRING, 0 TSRMLS_CC)==FAILURE) { + if (sxe_object_cast(z, retval, IS_STRING TSRMLS_CC)==FAILURE) { zend_error(E_ERROR, "Unable to cast node to string"); /* FIXME: Should not be fatal */ } @@ -1848,11 +1841,7 @@ zend_object_value rv; rv.handle = zend_objects_store_put(intern, sxe_object_dtor, (zend_objects_free_object_storage_t)sxe_object_free_storage, sxe_object_clone TSRMLS_CC); - if (EG(ze1_compatibility_mode)) { - rv.handlers = (zend_object_handlers *) &sxe_ze1_object_handlers; - } else { - rv.handlers = (zend_object_handlers *) &sxe_object_handlers; - } + rv.handlers = (zend_object_handlers *) &sxe_object_handlers; return rv; } @@ -1962,7 +1951,7 @@ long options = 0; zend_bool is_url = 0; - php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC); + php_set_error_handling(EH_THROW, zend_exception_get_default(TSRMLS_C) TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lb", &data, &data_len, &options, &is_url) == FAILURE) { php_std_error_handling(); return; @@ -1974,7 +1963,7 @@ if (!docp) { ((php_libxml_node_object *)sxe)->document = NULL; - zend_throw_exception(zend_exception_get_default(), "String could not be parsed as XML", 0 TSRMLS_CC); + zend_throw_exception(zend_exception_get_default(TSRMLS_C), "String could not be parsed as XML", 0 TSRMLS_CC); return; } @@ -2055,10 +2044,13 @@ return NULL; } -zend_object_iterator *php_sxe_get_iterator(zend_class_entry *ce, zval *object TSRMLS_DC) +zend_object_iterator *php_sxe_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC) { php_sxe_iterator *iterator = emalloc(sizeof(php_sxe_iterator)); + if (by_ref) { + zend_error(E_ERROR, "An iterator cannot be used with foreach by reference"); + } object->refcount++; iterator->intern.data = (void*)object; iterator->intern.funcs = &php_sxe_iterator_funcs; @@ -2310,7 +2302,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "Simplexml support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.1 $"); php_info_print_table_row(2, "Schema support", #ifdef LIBXML_SCHEMAS_ENABLED "enabled"); http://cvs.php.net/viewcvs.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33&r2=1.164.2.33.2.1&diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33 php-src/ext/reflection/php_reflection.c:1.164.2.33.2.1 --- php-src/ext/reflection/php_reflection.c:1.164.2.33 Wed Mar 29 14:28:42 2006 +++ php-src/ext/reflection/php_reflection.c Tue May 9 23:58:46 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_reflection.c,v 1.164.2.33 2006/03/29 14:28:42 tony2001 Exp $ */ +/* $Id: php_reflection.c,v 1.164.2.33.2.1 2006/05/09 23:58:46 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -4409,7 +4409,7 @@ reflection_object_handlers.write_property = _reflection_write_property; INIT_CLASS_ENTRY(_reflection_entry, "ReflectionException", reflection_exception_functions); - reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(), NULL TSRMLS_CC); + reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); INIT_CLASS_ENTRY(_reflection_entry, "Reflection", reflection_functions); reflection_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC); @@ -4485,7 +4485,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.164.2.33 2006/03/29 14:28:42 tony2001 Exp $"); + php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.164.2.33.2.1 2006/05/09 23:58:46 helly Exp $"); php_info_print_table_end(); } /* }}} */ http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/mysqli_driver.c?r1=1.4.2.3&r2=1.4.2.3.2.1&diff_format=u Index: php-src/ext/mysqli/mysqli_driver.c diff -u php-src/ext/mysqli/mysqli_driver.c:1.4.2.3 php-src/ext/mysqli/mysqli_driver.c:1.4.2.3.2.1 --- php-src/ext/mysqli/mysqli_driver.c:1.4.2.3 Fri Mar 24 09:32:24 2006 +++ php-src/ext/mysqli/mysqli_driver.c Tue May 9 23:58:46 2006 @@ -79,7 +79,7 @@ { MyG(report_mode) = Z_LVAL_P(value); php_set_error_handling(MyG(report_mode) & MYSQLI_REPORT_STRICT ? EH_THROW : EH_NORMAL, - zend_exception_get_default() TSRMLS_CC); + zend_exception_get_default(TSRMLS_C) TSRMLS_CC); return SUCCESS; } /* }}} */ http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/mysqli.c?r1=1.72.2.16.2.1&r2=1.72.2.16.2.2&diff_format=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.72.2.16.2.1 php-src/ext/mysqli/mysqli.c:1.72.2.16.2.2 --- php-src/ext/mysqli/mysqli.c:1.72.2.16.2.1 Mon May 8 16:19:43 2006 +++ php-src/ext/mysqli/mysqli.c Tue May 9 23:58:46 2006 @@ -15,7 +15,7 @@ | Author: Georg Richter <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: mysqli.c,v 1.72.2.16.2.1 2006/05/08 16:19:43 georg Exp $ + $Id: mysqli.c,v 1.72.2.16.2.2 2006/05/09 23:58:46 helly Exp $ */ #ifdef HAVE_CONFIG_H @@ -322,7 +322,7 @@ } else if (obj->zo.ce == mysqli_driver_class_entry) { f.handler = ZEND_FN(mysqli_driver_construct); } else if (obj->zo.ce == mysqli_warning_class_entry) { - f.handler = ZEND_FN(mysqli_warning___construct); + f.handler = ZEND_MN(mysqli_warning___construct); } return (union _zend_function*)&f; @@ -877,7 +877,7 @@ * single value is an array. Also we'd have to make that one * argument passed by reference. */ - zend_throw_exception(zend_exception_get_default(), "Parameter ctor_params must be an array", 0 TSRMLS_CC); + zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Parameter ctor_params must be an array", 0 TSRMLS_CC); return; } } else { @@ -892,7 +892,7 @@ fcc.object_pp = &return_value; if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name); + zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name); } else { if (retval_ptr) { zval_ptr_dtor(&retval_ptr); @@ -902,7 +902,7 @@ efree(fci.params); } } else if (ctor_params) { - zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name); + zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name); } } } http://cvs.php.net/viewcvs.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6&r2=1.213.2.6.2.1&diff_format=u Index: php-src/ext/mysql/php_mysql.c diff -u php-src/ext/mysql/php_mysql.c:1.213.2.6 php-src/ext/mysql/php_mysql.c:1.213.2.6.2.1 --- php-src/ext/mysql/php_mysql.c:1.213.2.6 Sun Jan 1 12:50:09 2006 +++ php-src/ext/mysql/php_mysql.c Tue May 9 23:58:46 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c,v 1.213.2.6 2006/01/01 12:50:09 sniper Exp $ */ +/* $Id: php_mysql.c,v 1.213.2.6.2.1 2006/05/09 23:58:46 helly Exp $ */ /* TODO: * @@ -2043,7 +2043,7 @@ * single value is an array. Also we'd have to make that one * argument passed by reference. */ - zend_throw_exception(zend_exception_get_default(), "Parameter ctor_params must be an array", 0 TSRMLS_CC); + zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Parameter ctor_params must be an array", 0 TSRMLS_CC); return; } } else { @@ -2058,7 +2058,7 @@ fcc.object_pp = &return_value; if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name); + zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name); } else { if (retval_ptr) { zval_ptr_dtor(&retval_ptr); @@ -2068,7 +2068,7 @@ efree(fci.params); } } else if (ctor_params) { - zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name); + zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name); } } #endif
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php