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);
}
- *object_ptr = zobj;
+ } else {
++ *zobject = Z_OBJ_P(zobj);
}
}
return function_handler;
* "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;