diff options
Diffstat (limited to 'Zend/zend.c')
| -rw-r--r-- | Zend/zend.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index d52f3b6b9b..4c97e4231b 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -46,7 +46,7 @@ /* true multithread-shared globals */ ZEND_API zend_class_entry *zend_standard_class_def = NULL; -ZEND_API zend_size_t (*zend_printf)(const char *format, ...); +ZEND_API size_t (*zend_printf)(const char *format, ...); ZEND_API zend_write_func_t zend_write; ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path TSRMLS_DC); ZEND_API int (*zend_stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC); @@ -54,14 +54,14 @@ ZEND_API void (*zend_block_interruptions)(void); ZEND_API void (*zend_unblock_interruptions)(void); ZEND_API void (*zend_ticks_function)(int ticks TSRMLS_DC); ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args); -zend_size_t (*zend_vspprintf)(char **pbuf, zend_size_t max_len, const char *format, va_list ap); +size_t (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap); zend_string *(*zend_vstrpprintf)(size_t max_len, const char *format, va_list ap); ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC); ZEND_API char *(*zend_resolve_path)(const char *filename, int filename_len TSRMLS_DC); void (*zend_on_timeout)(int seconds TSRMLS_DC); -static void (*zend_message_dispatcher_p)(zend_int_t message, const void *data TSRMLS_DC); +static void (*zend_message_dispatcher_p)(zend_long message, const void *data TSRMLS_DC); static int (*zend_get_configuration_directive_p)(const char *name, uint name_length, zval *contents); static ZEND_INI_MH(OnUpdateErrorReporting) /* {{{ */ @@ -134,7 +134,7 @@ static void print_hash(zend_write_func_t write_func, HashTable *ht, int indent, { zval *tmp; zend_string *string_key; - zend_uint_t num_key; + zend_ulong num_key; int i; for (i = 0; i < indent; i++) { @@ -193,7 +193,7 @@ static void print_flat_hash(HashTable *ht TSRMLS_DC) /* {{{ */ { zval *tmp; zend_string *string_key; - zend_uint_t num_key; + zend_ulong num_key; int i = 0; ZEND_HASH_FOREACH_KEY_VAL_IND(ht, num_key, string_key, tmp) { @@ -226,23 +226,23 @@ again: break; case IS_TRUE: if (CG(one_char_string)['1']) { - ZVAL_INT_STR(expr_copy, CG(one_char_string)['1']); + ZVAL_LONG_STR(expr_copy, CG(one_char_string)['1']); } else { - ZVAL_NEW_STR(expr_copy, STR_INIT("1", 1, 0)); + ZVAL_NEW_STR(expr_copy, zend_string_init("1", 1, 0)); } break; case IS_RESOURCE: { - char buf[sizeof("Resource id #") + MAX_LENGTH_OF_ZEND_INT]; + char buf[sizeof("Resource id #") + MAX_LENGTH_OF_LONG]; int len; len = snprintf(buf, sizeof(buf), "Resource id #" ZEND_INT_FMT, Z_RES_HANDLE_P(expr)); - ZVAL_NEW_STR(expr_copy, STR_INIT(buf, len, 0)); + ZVAL_NEW_STR(expr_copy, zend_string_init(buf, len, 0)); } break; case IS_ARRAY: zend_error(E_NOTICE, "Array to string conversion"); // TODO: use interned string ??? - ZVAL_NEW_STR(expr_copy, STR_INIT("Array", sizeof("Array") - 1, 0)); + ZVAL_NEW_STR(expr_copy, zend_string_init("Array", sizeof("Array") - 1, 0)); break; case IS_OBJECT: if (Z_OBJ_HANDLER_P(expr, cast_object)) { @@ -278,7 +278,7 @@ again: case IS_REFERENCE: expr = Z_REFVAL_P(expr); if (Z_TYPE_P(expr) == IS_STRING) { - ZVAL_STR(expr_copy, STR_COPY(Z_STR_P(expr))); + ZVAL_STR(expr_copy, zend_string_copy(Z_STR_P(expr))); return 1; } goto again; @@ -307,7 +307,7 @@ ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int in write_func(str->val, len); } - STR_RELEASE(str); + zend_string_release(str); return len; } /* }}} */ @@ -343,7 +343,7 @@ ZEND_API void zend_print_flat_zval_r(zval *expr TSRMLS_DC) /* {{{ */ zend_printf("%s Object (", "Unknown Class"); } if (class_name) { - STR_RELEASE(class_name); + zend_string_release(class_name); } if (Z_OBJ_HANDLER_P(expr, get_properties)) { properties = Z_OBJPROP_P(expr); @@ -406,7 +406,7 @@ ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int } ZEND_PUTS_EX(" Object\n"); if (class_name) { - STR_RELEASE(class_name); + zend_string_release(class_name); } if ((properties = Z_OBJDEBUG_P(expr, is_temp)) == NULL) { break; @@ -739,7 +739,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions TS zend_interned_strings_init(TSRMLS_C); zend_startup_builtin_functions(TSRMLS_C); zend_register_standard_constants(TSRMLS_C); - zend_register_auto_global(STR_INIT("GLOBALS", sizeof("GLOBALS") - 1, 1), 1, php_auto_globals_create_globals TSRMLS_CC); + zend_register_auto_global(zend_string_init("GLOBALS", sizeof("GLOBALS") - 1, 1), 1, php_auto_globals_create_globals TSRMLS_CC); #ifndef ZTS zend_init_rsrc_plist(TSRMLS_C); @@ -972,7 +972,7 @@ ZEND_API void zend_deactivate(TSRMLS_D) /* {{{ */ /* }}} */ BEGIN_EXTERN_C() -ZEND_API void zend_message_dispatcher(zend_int_t message, const void *data TSRMLS_DC) /* {{{ */ +ZEND_API void zend_message_dispatcher(zend_long message, const void *data TSRMLS_DC) /* {{{ */ { if (zend_message_dispatcher_p) { zend_message_dispatcher_p(message, data TSRMLS_CC); @@ -1152,13 +1152,13 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */ #endif va_copy(usr_copy, args); len = zend_vspprintf(&str, 0, format, usr_copy); - ZVAL_NEW_STR(¶ms[1], STR_INIT(str, len, 0)); + ZVAL_NEW_STR(¶ms[1], zend_string_init(str, len, 0)); efree(str); #ifdef va_copy va_end(usr_copy); #endif - ZVAL_INT(¶ms[0], type); + ZVAL_LONG(¶ms[0], type); if (error_filename) { ZVAL_STRING(¶ms[2], error_filename); @@ -1166,7 +1166,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */ ZVAL_NULL(¶ms[2]); } - ZVAL_INT(¶ms[3], error_lineno); + ZVAL_LONG(¶ms[3], error_lineno); symbol_table = zend_rebuild_symbol_table(TSRMLS_C); @@ -1293,7 +1293,7 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval *retval, int file_cou int i; zend_file_handle *file_handle; zend_op_array *op_array; - zend_int_t orig_interactive = CG(interactive); + zend_long orig_interactive = CG(interactive); va_start(files, file_count); for (i = 0; i < file_count; i++) { @@ -1390,7 +1390,7 @@ void free_estring(char **str_p) /* {{{ */ void free_string_zval(zval *zv) /* {{{ */ { zend_string *str = Z_PTR_P(zv); - STR_RELEASE(str); + zend_string_release(str); } /* }}} */ |
