[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c /ext/spl/tests spl_autoload_008.phpt
helly Thu Mar 23 19:55:16 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c /php-src/ext/spl/tests spl_autoload_008.phpt Log: - MFH . spl_autoload_register() return bool to denote success/failure . spl_autoload_unregister() acept any callable http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.27&r2=1.52.2.28&diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.27 php-src/ext/spl/php_spl.c:1.52.2.28 --- php-src/ext/spl/php_spl.c:1.52.2.27 Mon Feb 20 22:21:54 2006 +++ php-src/ext/spl/php_spl.c Thu Mar 23 19:55:16 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.27 2006/02/20 22:21:54 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.28 2006/03/23 19:55:16 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -375,7 +375,7 @@ } } /* }}} */ -/* {{{ proto void spl_autoload_register([string autoload_function = "spl_autoload" [, throw = true]]) +/* {{{ proto bool spl_autoload_register([mixed autoload_function = "spl_autoload" [, throw = true]]) Register given function as __autoload() implementation */ PHP_FUNCTION(spl_autoload_register) { @@ -399,7 +399,7 @@ if (do_throw) { zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function spl_autoload_call() cannot be registered"); } - return; + RETURN_FALSE; } } } @@ -411,25 +411,25 @@ zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array specifies a non static method but no object"); } efree(func_name); - return; + RETURN_FALSE; } else if (do_throw) { zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify %s %smethod", alfi.func_ptr ? "a callable" : "an existing", !obj_ptr ? "static " : ""); } efree(func_name); - return; + RETURN_FALSE; } else if (Z_TYPE_P(zcallable) == IS_STRING) { if (do_throw) { zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function '%s' not %s", func_name, alfi.func_ptr ? "callable" : "found"); } efree(func_name); - return; + RETURN_FALSE; } else { if (do_throw) { zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Illegal value passed"); } efree(func_name); - return; + RETURN_FALSE; } } @@ -442,7 +442,7 @@ } else { alfi.obj = NULL; } - + if (!SPL_G(autoload_functions)) { ALLOC_HASHTABLE(SPL_G(autoload_functions)); zend_hash_init(SPL_G(autoload_functions), 1, NULL, (dtor_func_t) autoload_func_info_dtor, 0); @@ -469,25 +469,34 @@ } else { zend_hash_find(EG(function_table), "spl_autoload", sizeof("spl_autoload"), (void **) &EG(autoload_func)); } + RETURN_TRUE; } /* }}} */ -/* {{{ proto bool spl_autoload_unregister(string autoload_function) +/* {{{ proto bool spl_autoload_unregister(mixed autoload_function) Unregister given function as __autoload() implementation */ PHP_FUNCTION(spl_autoload_unregister) { - char *func_name, *lc_name; - int func_name_len, success = FAILURE; + char *func_name; + int func_name_len; + zval *zcallable; + int success = FAILURE; zend_function *spl_func_ptr; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &func_name, &func_name_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &zcallable) == FAILURE) { return; } - lc_name = do_alloca(func_name_len + 1); - zend_str_tolower_copy(lc_name, func_name, func_name_len); + if (!zend_is_callable_ex(zcallable, IS_CALLABLE_CHECK_SYNTAX_ONLY, &func_n
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c spl_array.c
helly Sun Feb 12 16:44:37 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c spl_array.c Log: - MFH No more old parameter api usage http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.25&r2=1.52.2.26&diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.25 php-src/ext/spl/php_spl.c:1.52.2.26 --- php-src/ext/spl/php_spl.c:1.52.2.25 Sun Jan 1 12:50:13 2006 +++ php-src/ext/spl/php_spl.c Sun Feb 12 16:44:36 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.25 2006/01/01 12:50:13 sniper Exp $ */ +/* $Id: php_spl.c,v 1.52.2.26 2006/02/12 16:44:36 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -340,7 +340,7 @@ Try all registerd autoload function to load the requested class */ PHP_FUNCTION(spl_autoload_call) { - zval **class_name, *retval = NULL; + zval *class_name, *retval = NULL; int class_name_len; char *func_name, *lc_name; uint func_name_len; @@ -348,18 +348,18 @@ HashPosition function_pos; autoload_func_info *alfi; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name) == FAILURE || Z_TYPE_PP(class_name) != IS_STRING) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &class_name) == FAILURE || Z_TYPE_P(class_name) != IS_STRING) { return; } if (SPL_G(autoload_functions)) { - class_name_len = Z_STRLEN_PP(class_name); - lc_name = zend_str_tolower_dup(Z_STRVAL_PP(class_name), class_name_len); + class_name_len = Z_STRLEN_P(class_name); + lc_name = zend_str_tolower_dup(Z_STRVAL_P(class_name), class_name_len); zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions), &function_pos); while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions), &function_pos) == SUCCESS && !EG(exception)) { zend_hash_get_current_key_ex(SPL_G(autoload_functions), &func_name, &func_name_len, &dummy, 0, &function_pos); zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **) &alfi, &function_pos); - zend_call_method(alfi->obj ? &alfi->obj : NULL, alfi->ce, &alfi->func_ptr, func_name, func_name_len, &retval, 1, *class_name, NULL TSRMLS_CC); + zend_call_method(alfi->obj ? &alfi->obj : NULL, alfi->ce, &alfi->func_ptr, func_name, func_name_len, &retval, 1, class_name, NULL TSRMLS_CC); if (retval) { zval_ptr_dtor(&retval); } @@ -371,7 +371,7 @@ efree(lc_name); } else { /* do not use or overwrite &EG(autoload_func) here */ - zend_call_method_with_1_params(NULL, NULL, NULL, "spl_autoload", NULL, *class_name); + zend_call_method_with_1_params(NULL, NULL, NULL, "spl_autoload", NULL, class_name); } } /* }}} */ http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.8&r2=1.71.2.9&diff_format=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.71.2.8 php-src/ext/spl/spl_array.c:1.71.2.9 --- php-src/ext/spl/spl_array.c:1.71.2.8Thu Feb 2 22:17:42 2006 +++ php-src/ext/spl/spl_array.c Sun Feb 12 16:44:36 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_array.c,v 1.71.2.8 2006/02/02 22:17:42 helly Exp $ */ +/* $Id: spl_array.c,v 1.71.2.9 2006/02/12 16:44:36 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -913,11 +913,10 @@ array_init(return_value); zend_hash_copy(HASH_OF(return_value), spl_array_get_hash_table(intern, 0 TSRMLS_CC), (copy_ctor_func_t) zval_add_ref, &tmp, sizeof(zval*)); - if (ZEND_NUM_ARGS() > 1 || zend_get_parameters_ex(1, &array) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &array) == FAILURE) { WRONG_PARAM_COUNT; } - if (Z_TYPE_PP(array) == IS_OBJECT && intern == (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC)) - { + if (Z_TYPE_PP(array) == IS_OBJECT && intern == (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC)) { zval_ptr_dtor(&intern->array); array = &object; intern->array = object; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Wed Dec 21 20:05:24 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - We need to store the length of the class name http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.23&r2=1.52.2.24&diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.23 php-src/ext/spl/php_spl.c:1.52.2.24 --- php-src/ext/spl/php_spl.c:1.52.2.23 Sun Dec 18 15:46:46 2005 +++ php-src/ext/spl/php_spl.c Wed Dec 21 20:05:24 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.23 2005/12/18 15:46:46 zeev Exp $ */ +/* $Id: php_spl.c,v 1.52.2.24 2005/12/21 20:05:24 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -341,6 +341,7 @@ PHP_FUNCTION(spl_autoload_call) { zval **class_name, *retval = NULL; + int class_name_len; char *func_name, *lc_name; uint func_name_len; ulong dummy; @@ -352,7 +353,8 @@ } if (SPL_G(autoload_functions)) { - lc_name = zend_str_tolower_dup(Z_STRVAL_PP(class_name), Z_STRLEN_PP(class_name)); + class_name_len = Z_STRLEN_PP(class_name); + lc_name = zend_str_tolower_dup(Z_STRVAL_PP(class_name), class_name_len); zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions), &function_pos); while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions), &function_pos) == SUCCESS && !EG(exception)) { zend_hash_get_current_key_ex(SPL_G(autoload_functions), &func_name, &func_name_len, &dummy, 0, &function_pos); @@ -361,7 +363,7 @@ if (retval) { zval_ptr_dtor(&retval); } - if (zend_hash_exists(EG(class_table), lc_name, Z_STRLEN_PP(class_name)+1)) { + if (zend_hash_exists(EG(class_table), lc_name, class_name_len + 1)) { break; } zend_hash_move_forward_ex(SPL_G(autoload_functions), &function_pos); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
zeevSun Dec 18 15:46:46 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: prototype fix http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.22&r2=1.52.2.23&diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.22 php-src/ext/spl/php_spl.c:1.52.2.23 --- php-src/ext/spl/php_spl.c:1.52.2.22 Sun Dec 18 15:40:34 2005 +++ php-src/ext/spl/php_spl.c Sun Dec 18 15:46:46 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.22 2005/12/18 15:40:34 zeev Exp $ */ +/* $Id: php_spl.c,v 1.52.2.23 2005/12/18 15:46:46 zeev Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -302,7 +302,7 @@ } } /* }}} */ -/* {{{ proto void string spl_autoload_extensions([string file_extensions]) +/* {{{ proto string spl_autoload_extensions([string file_extensions]) Register and return default file extensions for spl_autoload */ PHP_FUNCTION(spl_autoload_extensions) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
zeevSun Dec 18 15:40:34 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: Fix protos http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.21&r2=1.52.2.22&diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.21 php-src/ext/spl/php_spl.c:1.52.2.22 --- php-src/ext/spl/php_spl.c:1.52.2.21 Fri Dec 16 23:58:38 2005 +++ php-src/ext/spl/php_spl.c Sun Dec 18 15:40:34 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.21 2005/12/16 23:58:38 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.22 2005/12/18 15:40:34 zeev Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -83,7 +83,7 @@ return *ce; } -/* {{{ array class_parents(object instance) +/* {{{ proto array class_parents(object instance) Return an array containing the names of all parent classes */ PHP_FUNCTION(class_parents) { @@ -246,7 +246,7 @@ return 0; } /* }}} */ -/* {{{ void spl_autoload(string class_name [, string file_extensions]) +/* {{{ proto void spl_autoload(string class_name [, string file_extensions]) Default implementation for __autoload() */ PHP_FUNCTION(spl_autoload) { @@ -302,7 +302,7 @@ } } /* }}} */ -/* {{{ void string spl_autoload_extensions([string file_extensions]) +/* {{{ proto void string spl_autoload_extensions([string file_extensions]) Register and return default file extensions for spl_autoload */ PHP_FUNCTION(spl_autoload_extensions) { @@ -336,7 +336,7 @@ } } -/* {{{ void spl_autoload_call(string class_name) +/* {{{ proto void spl_autoload_call(string class_name) Try all registerd autoload function to load the requested class */ PHP_FUNCTION(spl_autoload_call) { @@ -373,7 +373,7 @@ } } /* }}} */ -/* {{{ void spl_autoload_register([string autoload_function = "spl_autoload" [, throw = true]]) +/* {{{ proto void spl_autoload_register([string autoload_function = "spl_autoload" [, throw = true]]) Register given function as __autoload() implementation */ PHP_FUNCTION(spl_autoload_register) { @@ -469,7 +469,7 @@ } } /* }}} */ -/* {{{ bool spl_autoload_unregister(string autoload_function) +/* {{{ proto bool spl_autoload_unregister(string autoload_function) Unregister given function as __autoload() implementation */ PHP_FUNCTION(spl_autoload_unregister) { @@ -511,7 +511,7 @@ RETURN_BOOL(success == SUCCESS); } /* }}} */ -/* {{{ false|array spl_autoload_functions() +/* {{{ proto false|array spl_autoload_functions() Return all registered __autoload() functionns */ PHP_FUNCTION(spl_autoload_functions) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Fri Dec 16 23:58:38 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - Simplify (+fix memleak) http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.20&r2=1.52.2.21&diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.20 php-src/ext/spl/php_spl.c:1.52.2.21 --- php-src/ext/spl/php_spl.c:1.52.2.20 Fri Dec 16 22:38:17 2005 +++ php-src/ext/spl/php_spl.c Fri Dec 16 23:58:38 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.20 2005/12/16 22:38:17 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.21 2005/12/16 23:58:38 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -393,9 +393,7 @@ if (ZEND_NUM_ARGS()) { if (Z_TYPE_P(zcallable) == IS_STRING) { if (Z_STRLEN_P(zcallable) == sizeof("spl_autoload_call") - 1) { - char tmp_name[sizeof("spl_autoload_call")]; - zend_str_tolower_copy(tmp_name, Z_STRVAL_P(zcallable), Z_STRLEN_P(zcallable)); - if (!strcmp(tmp_name, "spl_autoload_call")) { + if (!zend_binary_strcasecmp(Z_STRVAL_P(zcallable), sizeof("spl_autoload_call"), "spl_autoload_call", sizeof("spl_autoload_call"))) { if (do_throw) { zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function spl_autoload_call() cannot be registered"); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Fri Dec 16 22:38:17 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - Drop superflous param http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.19&r2=1.52.2.20&diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.19 php-src/ext/spl/php_spl.c:1.52.2.20 --- php-src/ext/spl/php_spl.c:1.52.2.19 Fri Dec 16 22:29:02 2005 +++ php-src/ext/spl/php_spl.c Fri Dec 16 22:38:17 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.19 2005/12/16 22:29:02 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.20 2005/12/16 22:38:17 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -426,7 +426,7 @@ return; } else { if (do_throw) { - zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Illegal value passed", func_name); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Illegal value passed"); } efree(func_name); return; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Fri Dec 16 22:29:02 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - Add SplTempFileObject to output http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.18&r2=1.52.2.19&diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.18 php-src/ext/spl/php_spl.c:1.52.2.19 --- php-src/ext/spl/php_spl.c:1.52.2.18 Fri Dec 16 22:17:32 2005 +++ php-src/ext/spl/php_spl.c Fri Dec 16 22:29:02 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.18 2005/12/16 22:17:32 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.19 2005/12/16 22:29:02 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -188,6 +188,7 @@ SPL_ADD_CLASS(SplObjectStorage, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SplObserver, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SplSubject, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(SplTempFileObject, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(UnderflowException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(UnexpectedValueException, z_list, sub, allow, ce_flags); \ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Fri Dec 16 22:17:33 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - Provide better error message when using illegal function 'pointers' http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.17&r2=1.52.2.18&diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.17 php-src/ext/spl/php_spl.c:1.52.2.18 --- php-src/ext/spl/php_spl.c:1.52.2.17 Tue Dec 6 02:00:14 2005 +++ php-src/ext/spl/php_spl.c Fri Dec 16 22:17:32 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.17 2005/12/06 02:00:14 sniper Exp $ */ +/* $Id: php_spl.c,v 1.52.2.18 2005/12/16 22:17:32 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -403,7 +403,7 @@ } } - if (!zend_is_callable_ex(zcallable, IS_CALLABLE_CHECK_IS_STATIC, &func_name, &func_name_len, &alfi.ce, &alfi.func_ptr, &obj_ptr TSRMLS_CC)) { + if (!zend_is_callable_ex(zcallable, IS_CALLABLE_STRICT, &func_name, &func_name_len, &alfi.ce, &alfi.func_ptr, &obj_ptr TSRMLS_CC)) { if (Z_TYPE_P(zcallable) == IS_ARRAY) { if (!obj_ptr && alfi.func_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { if (do_throw) { @@ -413,13 +413,13 @@ return; } else if (do_throw) { - zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify a callable %smethod", !obj_ptr ? "static " : ""); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify %s %smethod", alfi.func_ptr ? "a callable" : "an existing", !obj_ptr ? "static " : ""); } efree(func_name); return; } else if (Z_TYPE_P(zcallable) == IS_STRING) { if (do_throw) { - zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function '%s' not found", func_name); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function '%s' not %s", func_name, alfi.func_ptr ? "callable" : "found"); } efree(func_name); return; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c spl_functions.c spl_functions.h spl_iterators.c
sniper Mon Dec 5 21:00:15 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c spl_functions.c spl_functions.h spl_iterators.c Log: MFH http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.16&r2=1.52.2.17&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.16 php-src/ext/spl/php_spl.c:1.52.2.17 --- php-src/ext/spl/php_spl.c:1.52.2.16 Mon Nov 28 22:33:57 2005 +++ php-src/ext/spl/php_spl.c Mon Dec 5 21:00:14 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.16 2005/11/29 03:33:57 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.17 2005/12/06 02:00:14 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -45,7 +45,7 @@ /* {{{ spl_functions_none */ -function_entry spl_functions_none[] = { +zend_function_entry spl_functions_none[] = { {NULL, NULL, NULL} }; /* }}} */ @@ -599,7 +599,7 @@ /* {{{ spl_functions */ -function_entry spl_functions[] = { +zend_function_entry spl_functions[] = { PHP_FE(spl_classes, NULL) PHP_FE(spl_autoload,NULL) PHP_FE(spl_autoload_extensions, NULL) http://cvs.php.net/diff.php/php-src/ext/spl/spl_functions.c?r1=1.28&r2=1.28.2.1&ty=u Index: php-src/ext/spl/spl_functions.c diff -u php-src/ext/spl/spl_functions.c:1.28 php-src/ext/spl/spl_functions.c:1.28.2.1 --- php-src/ext/spl/spl_functions.c:1.28Wed Aug 3 10:07:53 2005 +++ php-src/ext/spl/spl_functions.c Mon Dec 5 21:00:14 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_functions.c,v 1.28 2005/08/03 14:07:53 sniper Exp $ */ +/* $Id: spl_functions.c,v 1.28.2.1 2005/12/06 02:00:14 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -50,7 +50,7 @@ /* }}} */ /* {{{ spl_register_std_class */ -void spl_register_std_class(zend_class_entry ** ppce, char * class_name, void * obj_ctor, function_entry * function_list TSRMLS_DC) +void spl_register_std_class(zend_class_entry ** ppce, char * class_name, void * obj_ctor, zend_function_entry * function_list TSRMLS_DC) { zend_class_entry ce; @@ -66,7 +66,7 @@ /* }}} */ /* {{{ spl_register_sub_class */ -void spl_register_sub_class(zend_class_entry ** ppce, zend_class_entry * parent_ce, char * class_name, void *obj_ctor, function_entry * function_list TSRMLS_DC) +void spl_register_sub_class(zend_class_entry ** ppce, zend_class_entry * parent_ce, char * class_name, void *obj_ctor, zend_function_entry * function_list TSRMLS_DC) { zend_class_entry ce; @@ -91,7 +91,7 @@ /* }}} */ /* {{{ spl_register_functions */ -void spl_register_functions(zend_class_entry * class_entry, function_entry * function_list TSRMLS_DC) +void spl_register_functions(zend_class_entry * class_entry, zend_function_entry * function_list TSRMLS_DC) { zend_register_functions(class_entry, function_list, &class_entry->function_table, MODULE_PERSISTENT TSRMLS_CC); } http://cvs.php.net/diff.php/php-src/ext/spl/spl_functions.h?r1=1.19.2.1&r2=1.19.2.2&ty=u Index: php-src/ext/spl/spl_functions.h diff -u php-src/ext/spl/spl_functions.h:1.19.2.1 php-src/ext/spl/spl_functions.h:1.19.2.2 --- php-src/ext/spl/spl_functions.h:1.19.2.1Wed Sep 14 23:33:04 2005 +++ php-src/ext/spl/spl_functions.h Mon Dec 5 21:00:14 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_functions.h,v 1.19.2.1 2005/09/15 03:33:04 helly Exp $ */ +/* $Id: spl_functions.h,v 1.19.2.2 2005/12/06 02:00:14 sniper Exp $ */ #ifndef PHP_FUNCTIONS_H #define PHP_FUNCTIONS_H @@ -57,13 +57,13 @@ void spl_destroy_class(zend_class_entry ** ppce); -void spl_register_std_class(zend_class_entry ** ppce, char * class_name, create_object_func_t ctor, function_entry * function_list TSRMLS_DC); -void spl_register_sub_class(zend_class_entry ** ppce, zend_class_entry * parent_ce, char * class_name, create_object_func_t ctor, function_entry * function_list TSRMLS_DC); +void spl_register_std_class(zend_class_entry ** ppce, char * class_name, create_object_func_t ctor, zend_function_entry * function_list TSRMLS_DC); +void spl_register_sub_class(zend_class_entry ** ppce, zend_class_entry * parent_ce, char * class_name, create_object_func_t ctor, zend_function_entry * function_list TSRMLS_DC); void spl_register_interface(zend_class_entry ** ppce, char * class_name, zend_function_entry *functions TSRMLS_DC); void spl_register_parent_ce(zend_class_entry * class_entry, zend_class_entry * parent_class TSRMLS_DC); -void spl_register_functions(zend_class_entry * class_entry, function_entry * function_list TSRMLS_DC); +void spl_register_functions(zend_class_entry * class_entry, zend_function_entry * function_list TSRMLS_DC); void spl_register_property( zend_clas
Re: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c spl_directory.c spl_directory.h /ext/spl/examples nocvsdir.php /ext/spl/tests iterator_028.phpt spl_autoload_004.phpt sxe_001.phpt sxe_004.phpt
-Andrei On Nov 28, 2005, at 7:37 PM, Marcus Boerger wrote: Hello, the main reason for this change is that the new SplFileInfo class can be used as a return value for DirectoryIterator/ RecursiveDirectoryIterator to suppress problems when put into CacheingIterator/ RecursiveCachingIterator. By having the object returned one can circumvent the fact that the former are active iterators while the caching iterator requires passive ones. regards marcus Tuesday, November 29, 2005, 4:34:00 AM, you wrote: helly Mon Nov 28 22:34:00 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c spl_directory.c spl_directory.h /php-src/ext/spl/examples nocvsdir.php /php-src/ext/spl/tests iterator_028.phpt spl_autoload_004.phpt sxe_001.phpt sxe_004.phpt Log: - MFH Add class SplFileInfo as base for DirectoryIterator and SplFileObject # As discussed with ilia before 5.1.0 Best regards, Marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c spl_directory.c spl_directory.h /ext/spl/examples nocvsdir.php /ext/spl/tests iterator_028.phpt spl_autoload_004.phpt sxe_001.phpt sxe_004.phpt
Hello, the main reason for this change is that the new SplFileInfo class can be used as a return value for DirectoryIterator/RecursiveDirectoryIterator to suppress problems when put into CacheingIterator/RecursiveCachingIterator. By having the object returned one can circumvent the fact that the former are active iterators while the caching iterator requires passive ones. regards marcus Tuesday, November 29, 2005, 4:34:00 AM, you wrote: > helly Mon Nov 28 22:34:00 2005 EDT > Modified files: (Branch: PHP_5_1) > /php-src/ext/splphp_spl.c spl_directory.c spl_directory.h > /php-src/ext/spl/examples nocvsdir.php > /php-src/ext/spl/tests iterator_028.phpt spl_autoload_004.phpt > sxe_001.phpt sxe_004.phpt > Log: > - MFH Add class SplFileInfo as base for DirectoryIterator and SplFileObject > # As discussed with ilia before 5.1.0 > > Best regards, Marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Mon Nov 7 08:08:29 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - Drop unnecessary param http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.14&r2=1.52.2.15&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.14 php-src/ext/spl/php_spl.c:1.52.2.15 --- php-src/ext/spl/php_spl.c:1.52.2.14 Thu Nov 3 17:06:30 2005 +++ php-src/ext/spl/php_spl.c Mon Nov 7 08:08:24 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.14 2005/11/03 22:06:30 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.15 2005/11/07 13:08:24 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -395,7 +395,7 @@ zend_str_tolower_copy(tmp_name, Z_STRVAL_P(zcallable), Z_STRLEN_P(zcallable)); if (!strcmp(tmp_name, "spl_autoload_call")) { if (do_throw) { - zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function spl_autoload_call() cannot be registered", func_name); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function spl_autoload_call() cannot be registered"); } return; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Thu Nov 3 17:06:31 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - MFH Add missing check flag http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.13&r2=1.52.2.14&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.13 php-src/ext/spl/php_spl.c:1.52.2.14 --- php-src/ext/spl/php_spl.c:1.52.2.13 Thu Nov 3 16:59:13 2005 +++ php-src/ext/spl/php_spl.c Thu Nov 3 17:06:30 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.13 2005/11/03 21:59:13 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.14 2005/11/03 22:06:30 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -402,7 +402,7 @@ } } - if (!zend_is_callable_ex(zcallable, 0, &func_name, &func_name_len, &alfi.ce, &alfi.func_ptr, &obj_ptr TSRMLS_CC)) { + if (!zend_is_callable_ex(zcallable, IS_CALLABLE_CHECK_IS_STATIC, &func_name, &func_name_len, &alfi.ce, &alfi.func_ptr, &obj_ptr TSRMLS_CC)) { if (Z_TYPE_P(zcallable) == IS_ARRAY) { if (!obj_ptr && alfi.func_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { if (do_throw) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Thu Nov 3 16:59:13 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - MFH Try fixing #35088 http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.12&r2=1.52.2.13&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.12 php-src/ext/spl/php_spl.c:1.52.2.13 --- php-src/ext/spl/php_spl.c:1.52.2.12 Thu Nov 3 16:28:43 2005 +++ php-src/ext/spl/php_spl.c Thu Nov 3 16:59:13 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.12 2005/11/03 21:28:43 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.13 2005/11/03 21:59:13 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -449,7 +449,11 @@ zend_hash_find(EG(function_table), "spl_autoload", sizeof("spl_autoload"), (void **) &spl_func_ptr); if (EG(autoload_func) == spl_func_ptr) { /* registered already, so we insert that first */ - autoload_func_info spl_alfi = {spl_func_ptr, NULL, NULL}; + autoload_func_info spl_alfi; + + spl_alfi.func_ptr = spl_func_ptr; + spl_alfi.obj = NULL; + spl_alfi.ce = NULL; zend_hash_add(SPL_G(autoload_functions), "spl_autoload", sizeof("spl_autoload"), &spl_alfi, sizeof(autoload_func_info), NULL); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Thu Nov 3 16:28:43 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - MFH Add missing check http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.11&r2=1.52.2.12&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.11 php-src/ext/spl/php_spl.c:1.52.2.12 --- php-src/ext/spl/php_spl.c:1.52.2.11 Wed Nov 2 15:31:01 2005 +++ php-src/ext/spl/php_spl.c Thu Nov 3 16:28:43 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.11 2005/11/02 20:31:01 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.12 2005/11/03 21:28:43 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -404,7 +404,7 @@ if (!zend_is_callable_ex(zcallable, 0, &func_name, &func_name_len, &alfi.ce, &alfi.func_ptr, &obj_ptr TSRMLS_CC)) { if (Z_TYPE_P(zcallable) == IS_ARRAY) { - if (!obj_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { + if (!obj_ptr && alfi.func_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { if (do_throw) { zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array specifies a non static method but no object"); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Wed Nov 2 15:31:02 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - Make spl_autoload_register use zend_is_callable_ex() http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.10&r2=1.52.2.11&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.10 php-src/ext/spl/php_spl.c:1.52.2.11 --- php-src/ext/spl/php_spl.c:1.52.2.10 Wed Oct 26 18:47:23 2005 +++ php-src/ext/spl/php_spl.c Wed Nov 2 15:31:01 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.10 2005/10/26 22:47:23 tony2001 Exp $ */ +/* $Id: php_spl.c,v 1.52.2.11 2005/11/02 20:31:01 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -384,23 +384,53 @@ autoload_func_info alfi; zval **obj_ptr; - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "|sb", &func_name, &func_name_len, &do_throw) == FAILURE) { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|b", &zcallable, &do_throw) == FAILURE) { - return; + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "|zb", &zcallable, &do_throw) == FAILURE) { + return; + } + + if (ZEND_NUM_ARGS()) { + if (Z_TYPE_P(zcallable) == IS_STRING) { + if (Z_STRLEN_P(zcallable) == sizeof("spl_autoload_call") - 1) { + char tmp_name[sizeof("spl_autoload_call")]; + zend_str_tolower_copy(tmp_name, Z_STRVAL_P(zcallable), Z_STRLEN_P(zcallable)); + if (!strcmp(tmp_name, "spl_autoload_call")) { + if (do_throw) { + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function spl_autoload_call() cannot be registered", func_name); + } + return; + } + } } + if (!zend_is_callable_ex(zcallable, 0, &func_name, &func_name_len, &alfi.ce, &alfi.func_ptr, &obj_ptr TSRMLS_CC)) { - if (do_throw) { - zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify a callable static method"); - } - efree(func_name); - return; - } else if (!obj_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { - if (do_throw) { - zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array specifies a non static method but no object"); + if (Z_TYPE_P(zcallable) == IS_ARRAY) { + if (!obj_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { + if (do_throw) { + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array specifies a non static method but no object"); + } + efree(func_name); + return; + } + else if (do_throw) { + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify a callable %smethod", !obj_ptr ? "static " : ""); + } + efree(func_name); + return; + } else if (Z_TYPE_P(zcallable) == IS_STRING) { + if (do_throw) { + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function '%s' not found", func_name); + } + efree(func_name); + return; + } else { + if (do_throw) { + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Illegal value passed", func_name); + } + efree(func_name); + return; } - efree(func_name); - return; } + lc_name = do_alloca(func_name_len + 1); zend_str_tolower_copy(lc_name, func_name, func_name_len); efree(func_name); @@ -410,30 +440,7 @@ } else { alfi.obj = NULL; } - } else if (Z
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
tony2001Wed Oct 26 18:47:23 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: MFH: make compilers happy http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.9&r2=1.52.2.10&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.9 php-src/ext/spl/php_spl.c:1.52.2.10 --- php-src/ext/spl/php_spl.c:1.52.2.9 Tue Oct 25 19:20:29 2005 +++ php-src/ext/spl/php_spl.c Wed Oct 26 18:47:23 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.9 2005/10/25 23:20:29 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.10 2005/10/26 22:47:23 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -340,8 +340,8 @@ { zval **class_name, *retval = NULL; char *func_name, *lc_name; - int func_name_len; - long dummy; + uint func_name_len; + ulong dummy; HashPosition function_pos; autoload_func_info *alfi; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Tue Oct 25 19:20:30 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - MFH zend_is_callable_ex() has been changed http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.8&r2=1.52.2.9&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.8 php-src/ext/spl/php_spl.c:1.52.2.9 --- php-src/ext/spl/php_spl.c:1.52.2.8 Mon Sep 26 13:56:26 2005 +++ php-src/ext/spl/php_spl.c Tue Oct 25 19:20:29 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.8 2005/09/26 17:56:26 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.9 2005/10/25 23:20:29 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -388,7 +388,7 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|b", &zcallable, &do_throw) == FAILURE) { return; } - if (!zend_is_callable_ex(zcallable, 0, &func_name, &func_name_len, &alfi.func_ptr, &obj_ptr TSRMLS_CC)) { + if (!zend_is_callable_ex(zcallable, 0, &func_name, &func_name_len, &alfi.ce, &alfi.func_ptr, &obj_ptr TSRMLS_CC)) { if (do_throw) { zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify a callable static method"); } @@ -407,10 +407,8 @@ if (obj_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { alfi.obj = *obj_ptr; alfi.obj->refcount++; - alfi.ce = Z_OBJCE_P(alfi.obj); } else { alfi.obj = NULL; - alfi.ce = NULL; } } else if (ZEND_NUM_ARGS()) { lc_name = do_alloca(func_name_len + 1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Mon Sep 26 13:56:27 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - MFH: Reset global pointer to NULL after mem free (required for apache 1.3) http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.7&r2=1.52.2.8&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.7 php-src/ext/spl/php_spl.c:1.52.2.8 --- php-src/ext/spl/php_spl.c:1.52.2.7 Sun Sep 25 14:04:34 2005 +++ php-src/ext/spl/php_spl.c Mon Sep 26 13:56:26 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.7 2005/09/25 18:04:34 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.8 2005/09/26 17:56:26 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -627,6 +627,7 @@ PHP_RINIT_FUNCTION(spl) /* {{{ */ { SPL_G(autoload_extensions) = estrndup(".inc,.php", sizeof(".inc,.php")-1); + SPL_G(autoload_functions) = NULL; return SUCCESS; } /* }}} */ @@ -639,6 +640,7 @@ if (SPL_G(autoload_functions)) { zend_hash_destroy(SPL_G(autoload_functions)); FREE_HASHTABLE(SPL_G(autoload_functions)); + SPL_G(autoload_functions) = NULL; } return SUCCESS; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c /ext/spl/tests spl_autoload_004.phpt spl_autoload_005.phpt
helly Sun Sep 25 14:04:35 2005 EDT Added files: (Branch: PHP_5_1) /php-src/ext/spl/tests spl_autoload_004.phpt spl_autoload_005.phpt Modified files: /php-src/ext/splphp_spl.c Log: - Try to fix bugs #34216 (Segfault with autoload) and #34584 (Segfault with SPL autoload handler) http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.6&r2=1.52.2.7&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.6 php-src/ext/spl/php_spl.c:1.52.2.7 --- php-src/ext/spl/php_spl.c:1.52.2.6 Sun Sep 18 13:15:03 2005 +++ php-src/ext/spl/php_spl.c Sun Sep 25 14:04:34 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.6 2005/09/18 17:15:03 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.7 2005/09/25 18:04:34 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -321,6 +321,19 @@ RETURN_STRING(SPL_G(autoload_extensions), 1); } /* }}} */ +typedef struct { + zend_function *func_ptr; + zval *obj; + zend_class_entry *ce; +} autoload_func_info; + +static void autoload_func_info_dtor(autoload_func_info *alfi) +{ + if (alfi->obj) { + zval_ptr_dtor(&alfi->obj); + } +} + /* {{{ void spl_autoload_call(string class_name) Try all registerd autoload function to load the requested class */ PHP_FUNCTION(spl_autoload_call) @@ -330,7 +343,7 @@ int func_name_len; long dummy; HashPosition function_pos; - zend_function **func_ptr_ptr; + autoload_func_info *alfi; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name) == FAILURE || Z_TYPE_PP(class_name) != IS_STRING) { return; @@ -341,8 +354,8 @@ zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions), &function_pos); while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions), &function_pos) == SUCCESS && !EG(exception)) { zend_hash_get_current_key_ex(SPL_G(autoload_functions), &func_name, &func_name_len, &dummy, 0, &function_pos); - zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **) &func_ptr_ptr, &function_pos); - zend_call_method(NULL, NULL, func_ptr_ptr, func_name, func_name_len, &retval, 1, *class_name, NULL TSRMLS_CC); + zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **) &alfi, &function_pos); + zend_call_method(alfi->obj ? &alfi->obj : NULL, alfi->ce, &alfi->func_ptr, func_name, func_name_len, &retval, 1, *class_name, NULL TSRMLS_CC); if (retval) { zval_ptr_dtor(&retval); } @@ -362,37 +375,48 @@ Register given function as __autoload() implementation */ PHP_FUNCTION(spl_autoload_register) { - char *func_name, *lc_name = NULL; + char *func_name; + int func_name_len; + char *lc_name = NULL; zval *zcallable = NULL; - int func_name_len; zend_bool do_throw = 1; - zend_function *spl_func_ptr, *func_ptr, **func_ptr_ptr; + zend_function *spl_func_ptr; + autoload_func_info alfi; + zval **obj_ptr; if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "|sb", &func_name, &func_name_len, &do_throw) == FAILURE) { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|b", &zcallable, &func_name_len, &do_throw) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|b", &zcallable, &do_throw) == FAILURE) { return; } -#if MBO_0 - if (!zend_is_callable_ex(zcallable, IS_CALLABLE_CHECK_IS_STATIC, &func_name, &func_name_len, &func_ptr, NULL TSRMLS_CC)) { + if (!zend_is_callable_ex(zcallable, 0, &func_name, &func_name_len, &alfi.func_ptr, &obj_ptr TSRMLS_CC)) { if (do_throw) { - if (func_ptr) { - zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Non static methods are not supported yet"); - } else { - zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify a callable method or method"); - } + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify a callable static method"); } + efree(func_name); + return; + } else if (!obj_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { + if (do_throw) { + zend_throw
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c spl.php spl_directory.c spl_directory.h /ext/spl/internal fileobject.inc splfileobject.inc /ext/spl/tests fileobject_001.phpt fileobject_002.phpt
helly Thu Sep 15 10:08:17 2005 EDT Added files: (Branch: PHP_5_1) /php-src/ext/spl/internal splfileobject.inc Removed files: /php-src/ext/spl/internal fileobject.inc Modified files: /php-src/ext/splphp_spl.c spl.php spl_directory.c spl_directory.h /php-src/ext/spl/tests fileobject_001.phpt fileobject_002.phpt Log: - Rename file class again by popular demmand: calling it SplFileObject now http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.4&r2=1.52.2.5&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.4 php-src/ext/spl/php_spl.c:1.52.2.5 --- php-src/ext/spl/php_spl.c:1.52.2.4 Wed Sep 14 23:33:04 2005 +++ php-src/ext/spl/php_spl.c Thu Sep 15 10:08:14 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.4 2005/09/15 03:33:04 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.5 2005/09/15 14:08:14 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -161,7 +161,6 @@ SPL_ADD_CLASS(DirectoryIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(DomainException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(EmptyIterator, z_list, sub, allow, ce_flags); \ - SPL_ADD_CLASS(FileObject, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(FilterIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(InfiniteIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(InvalidArgumentException, z_list, sub, allow, ce_flags); \ @@ -183,6 +182,7 @@ SPL_ADD_CLASS(RuntimeException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SeekableIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SimpleXMLIterator, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(SplFileObject, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SplObjectStorage, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SplObserver, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SplSubject, z_list, sub, allow, ce_flags); \ http://cvs.php.net/diff.php/php-src/ext/spl/spl.php?r1=1.49.2.2&r2=1.49.2.3&ty=u Index: php-src/ext/spl/spl.php diff -u php-src/ext/spl/spl.php:1.49.2.2 php-src/ext/spl/spl.php:1.49.2.3 --- php-src/ext/spl/spl.php:1.49.2.2Wed Sep 14 23:33:04 2005 +++ php-src/ext/spl/spl.php Thu Sep 15 10:08:14 2005 @@ -53,7 +53,7 @@ * * - class DirectoryIterator implements Iterator * - class RecursiveDirectoryIterator extends DirectoryIterator implements RecursiveIterator - * - class FileObject implements RecursiveIterator, SeekableIterator + * - class SplFileObject implements RecursiveIterator, SeekableIterator * * 3) XML * @@ -761,16 +761,16 @@ */ function __toString(); - /** Open the current file as a FileObject instance + /** Open the current file as a SplFileObject instance * * @param mode open mode * @param use_include_path whether to search include paths (don't use) * @param context resource context to pased to open function * @throw RuntimeException if file cannot be opened (e.g. insufficient * access rights). -* @return The opened file as a FileObject instance +* @return The opened file as a SplFileObject instance * -* @see FileObject +* @see SplFileObject * @see file() */ function DirectoryIterator::openFile($mode = 'r', $use_include_path = false, $context = NULL); http://cvs.php.net/diff.php/php-src/ext/spl/spl_directory.c?r1=1.45.2.1&r2=1.45.2.2&ty=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.45.2.1 php-src/ext/spl/spl_directory.c:1.45.2.2 --- php-src/ext/spl/spl_directory.c:1.45.2.1Wed Sep 14 23:33:04 2005 +++ php-src/ext/spl/spl_directory.c Thu Sep 15 10:08:14 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_directory.c,v 1.45.2.1 2005/09/15 03:33:04 helly Exp $ */ +/* $Id: spl_directory.c,v 1.45.2.2 2005/09/15 14:08:14 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -50,7 +50,7 @@ /* decalre the class entry */ PHPAPI zend_class_entry *spl_ce_DirectoryIterator; PHPAPI zend_class_entry *spl_ce_RecursiveDirectoryIterator; -PHPAPI zend_class_entry *spl_ce_FileObject; +PHPAPI zend_class_entry *spl_ce_SplFileObject; static zend_object_value spl_file_object_new_ex(zend_class_entry *class_type, spl_file_object **obj TSRMLS_DC); static int spl_file_object_open(spl_file_object *intern, int use_include_path, int silent TSRMLS_DC); @@ -428,7 +428,7 @@ DirectoryFunction(isLink, FS_IS_LINK) /* }}} */ -/* {{{ proto FileObject DirectoryIterator::openFile([string mode = 'r' [, bool use_include_path [, resource context]]]) +/* {{{ proto SplFileObject Dire
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c spl.php spl_array.c spl_directory.c spl_functions.h spl_iterators.c spl_iterators.h spl_observer.c spl_observer.h /ext/spl/examples directorygraphit
helly Wed Sep 14 23:33:05 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c spl.php spl_array.c spl_directory.c spl_functions.h spl_iterators.c spl_iterators.h spl_observer.c spl_observer.h /php-src/ext/spl/examples directorygraphiterator.inc directorytreeiterator.inc /php-src/ext/spl/internal cachingiterator.inc cachingrecursiveiterator.inc fileobject.inc recursiveiteratoriterator.inc /php-src/ext/spl/tests array_009.phpt fileobject_001.phpt iterator_002.phpt iterator_023.phpt observer_001.phpt sxe_004.phpt Log: MFH: - Add SplObjectStorage - Add RecursiveFilterIterator - Rename Observer to SplObserver - Rename Subject to SplSubject - Move SPL constants to class constants - Update docu http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.3&r2=1.52.2.4&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.3 php-src/ext/spl/php_spl.c:1.52.2.4 --- php-src/ext/spl/php_spl.c:1.52.2.3 Wed Aug 24 06:17:43 2005 +++ php-src/ext/spl/php_spl.c Wed Sep 14 23:33:04 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.3 2005/08/24 10:17:43 johannes Exp $ */ +/* $Id: php_spl.c,v 1.52.2.4 2005/09/15 03:33:04 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -63,6 +63,7 @@ { zend_class_entry **ce; int found; + if (!autoload) { char *lc_name; @@ -169,7 +170,6 @@ SPL_ADD_CLASS(LimitIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(LogicException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(NoRewindIterator, z_list, sub, allow, ce_flags); \ - SPL_ADD_CLASS(Observer, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(OuterIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(OutOfBoundsException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(OutOfRangeException, z_list, sub, allow, ce_flags); \ @@ -177,12 +177,15 @@ SPL_ADD_CLASS(ParentIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RangeException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RecursiveDirectoryIterator, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(RecursiveFilterIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RecursiveIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RecursiveIteratorIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RuntimeException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SeekableIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SimpleXMLIterator, z_list, sub, allow, ce_flags); \ - SPL_ADD_CLASS(Subject, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(SplObjectStorage, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(SplObserver, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(SplSubject, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(UnderflowException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(UnexpectedValueException, z_list, sub, allow, ce_flags); \ http://cvs.php.net/diff.php/php-src/ext/spl/spl.php?r1=1.49.2.1&r2=1.49.2.2&ty=u Index: php-src/ext/spl/spl.php diff -u php-src/ext/spl/spl.php:1.49.2.1 php-src/ext/spl/spl.php:1.49.2.2 --- php-src/ext/spl/spl.php:1.49.2.1Fri Sep 2 15:11:10 2005 +++ php-src/ext/spl/spl.php Wed Sep 14 23:33:04 2005 @@ -59,7 +59,7 @@ * * SPL offers an advanced XML handling class: * - * - class SimpleXMLIterator extends simplexml_element extends recursiveiterator + * - class SimpleXMLIterator extends simplexml_element implements RecursiveIterator * * 4) Array Overloading * @@ -97,8 +97,9 @@ * * SPL suggests a standard way of implementing the observer pattern. * - * - interface Observer - * - interface Subject + * - interface SplObserver + * - interface SplSubject + * - class SplObjectStorage * * Some articles about SPL: * - http://www.sitepoint.com/article/php5-standard-library/1";>Introducing PHP 5's Standard Library @@ -106,10 +107,14 @@ * - http://www.phpriot.com/d/articles/php/oop/oop-with-spl-php-5-1/index.html";>Advanced OOP with SPL in PHP 5 * - http://www.devshed.com/c/a/PHP/The-Standard-PHP-Library-Part-1/";>The Standard PHP Library, Part 1 * - http://www.devshed.com/c/a/PHP/The-Standard-PHP-Library-Part-2/";>The Standard PHP Library, Part 2 + * - http://www.wiki.cc/php/SPL";>SPL on PHP Wiki + * - http://www.professionelle-softwareentwicklung-mit-php5.de/erste_auflage/oop.iterators.spl.html";>Die Standard PHP Library (SPL) [german] * * Talks on SPL: - * - http://somabo.de/talks/200504_php_quebec_s
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
johannesWed Aug 24 06:17:44 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - MFH: Fix alphabetic order and add missing class http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.2&r2=1.52.2.3&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.2 php-src/ext/spl/php_spl.c:1.52.2.3 --- php-src/ext/spl/php_spl.c:1.52.2.2 Wed Aug 10 04:36:46 2005 +++ php-src/ext/spl/php_spl.c Wed Aug 24 06:17:43 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.2 2005/08/10 08:36:46 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.3 2005/08/24 10:17:43 johannes Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -150,8 +150,8 @@ #define SPL_LIST_CLASSES(z_list, sub, allow, ce_flags) \ SPL_ADD_CLASS(AppendIterator, z_list, sub, allow, ce_flags); \ - SPL_ADD_CLASS(ArrayObject, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(ArrayIterator, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(ArrayObject, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(BadFunctionCallException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(BadMethodCallException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(CachingIterator, z_list, sub, allow, ce_flags); \ @@ -171,8 +171,8 @@ SPL_ADD_CLASS(NoRewindIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(Observer, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(OuterIterator, z_list, sub, allow, ce_flags); \ - SPL_ADD_CLASS(OutOfRangeException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(OutOfBoundsException, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(OutOfRangeException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(OverflowException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(ParentIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RangeException, z_list, sub, allow, ce_flags); \ @@ -184,6 +184,7 @@ SPL_ADD_CLASS(SimpleXMLIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(Subject, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(UnderflowException, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(UnexpectedValueException, z_list, sub, allow, ce_flags); \ /* {{{ proto array spl_classes() Return an array containing the names of all clsses and interfaces defined in SPL */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Wed Aug 10 04:36:47 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - MFH estrdup/strndup change (as hinted by Andi) http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.1&r2=1.52.2.2&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.1 php-src/ext/spl/php_spl.c:1.52.2.2 --- php-src/ext/spl/php_spl.c:1.52.2.1 Tue Aug 9 17:13:04 2005 +++ php-src/ext/spl/php_spl.c Wed Aug 10 04:36:46 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.1 2005/08/09 21:13:04 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.2 2005/08/10 08:36:46 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -596,7 +596,7 @@ PHP_RINIT_FUNCTION(spl) /* {{{ */ { - SPL_G(autoload_extensions) = estrdup(".inc,.php"); + SPL_G(autoload_extensions) = estrndup(".inc,.php", sizeof(".inc,.php")-1); return SUCCESS; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl php_spl.c
helly Tue Aug 9 17:13:04 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/splphp_spl.c Log: - MFH: PEAR uses .php not .inc.php (as discussed with Andi) http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52&r2=1.52.2.1&ty=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52 php-src/ext/spl/php_spl.c:1.52.2.1 --- php-src/ext/spl/php_spl.c:1.52 Wed Aug 3 10:07:52 2005 +++ php-src/ext/spl/php_spl.c Tue Aug 9 17:13:04 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52 2005/08/03 14:07:52 sniper Exp $ */ +/* $Id: php_spl.c,v 1.52.2.1 2005/08/09 21:13:04 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -596,7 +596,7 @@ PHP_RINIT_FUNCTION(spl) /* {{{ */ { - SPL_G(autoload_extensions) = estrdup(".inc,.inc.php"); + SPL_G(autoload_extensions) = estrdup(".inc,.php"); return SUCCESS; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php