From: Xinchen Hui Date: Sun, 1 Jun 2014 14:29:41 +0000 (+0800) Subject: Merge branch 'master' into phpng X-Git-Tag: POST_PHPNG_MERGE~234 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91b2ddc8160d90c2e6db126f9733c6f543584d66;p=php Merge branch 'master' into phpng Conflicts: ext/spl/spl_array.c ext/spl/spl_directory.c ext/standard/formatted_print.c --- 91b2ddc8160d90c2e6db126f9733c6f543584d66 diff --cc ext/spl/spl_iterators.c index 7900b4b5b2,b9901f8f27..9e1820ccac --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@@ -836,17 -837,19 +836,19 @@@ static union _zend_function *spl_recurs zval *zobj; if (!object->iterators) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "The %s instance wasn't initialized properly", Z_OBJCE_PP(object_ptr)->name); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "The %s instance wasn't initialized properly", zend_get_class_entry(*zobject TSRMLS_CC)->name->val); } - zobj = object->iterators[level].zobject; + zobj = &object->iterators[level].zobject; - function_handler = std_object_handlers.get_method(object_ptr, method, method_len, key TSRMLS_CC); + function_handler = std_object_handlers.get_method(zobject, method, key TSRMLS_CC); if (!function_handler) { - if (zend_hash_find(&Z_OBJCE_P(zobj)->function_table, method, method_len+1, (void **) &function_handler) == FAILURE) { + if ((function_handler = zend_hash_find_ptr(&Z_OBJCE_P(zobj)->function_table, method)) == NULL) { if (Z_OBJ_HT_P(zobj)->get_method) { - *object_ptr = zobj; - function_handler = Z_OBJ_HT_P(*object_ptr)->get_method(object_ptr, method, method_len, key TSRMLS_CC); + *zobject = Z_OBJ_P(zobj); + function_handler = (*zobject)->handlers->get_method(zobject, method, key TSRMLS_CC); } + } else { - *object_ptr = zobj; ++ *zobject = Z_OBJ_P(zobj); } } return function_handler; diff --cc ext/standard/formatted_print.c index 2942daaad3,2592b1655d..6c1f157cec --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@@ -368,16 -368,15 +368,17 @@@ php_sprintf_getnumber(char *buffer, in * "X" integer argument is printed as uppercase hexadecimal * */ -static char * -php_formatted_print(int ht, int *len, int use_array, int format_offset TSRMLS_DC) +static zend_string * +php_formatted_print(int param_count, int use_array, int format_offset TSRMLS_DC) { - zval ***args, **z_format; + zval *newargs = NULL; + zval *args, *z_format; int argc, size = 240, inpos = 0, outpos = 0, temppos; int alignment, currarg, adjusting, argnum, width, precision; - char *format, *result, padding; + char *format, padding; + zend_string *result; int always_sign; + int format_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", &args, &argc) == FAILURE) { return NULL;