|
46 | 46 |
|
47 | 47 | /* true multithread-shared globals */
|
48 | 48 | ZEND_API zend_class_entry *zend_standard_class_def = NULL;
|
49 |
| -ZEND_API zend_size_t (*zend_printf)(const char *format, ...); |
| 49 | +ZEND_API size_t (*zend_printf)(const char *format, ...); |
50 | 50 | ZEND_API zend_write_func_t zend_write;
|
51 | 51 | ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path TSRMLS_DC);
|
52 | 52 | ZEND_API int (*zend_stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC);
|
53 | 53 | ZEND_API void (*zend_block_interruptions)(void);
|
54 | 54 | ZEND_API void (*zend_unblock_interruptions)(void);
|
55 | 55 | ZEND_API void (*zend_ticks_function)(int ticks TSRMLS_DC);
|
56 | 56 | ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
|
57 |
| -zend_size_t (*zend_vspprintf)(char **pbuf, zend_size_t max_len, const char *format, va_list ap); |
| 57 | +size_t (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap); |
58 | 58 | zend_string *(*zend_vstrpprintf)(size_t max_len, const char *format, va_list ap);
|
59 | 59 | ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC);
|
60 | 60 | ZEND_API char *(*zend_resolve_path)(const char *filename, int filename_len TSRMLS_DC);
|
61 | 61 |
|
62 | 62 | void (*zend_on_timeout)(int seconds TSRMLS_DC);
|
63 | 63 |
|
64 |
| -static void (*zend_message_dispatcher_p)(zend_int_t message, const void *data TSRMLS_DC); |
| 64 | +static void (*zend_message_dispatcher_p)(zend_long message, const void *data TSRMLS_DC); |
65 | 65 | static int (*zend_get_configuration_directive_p)(const char *name, uint name_length, zval *contents);
|
66 | 66 |
|
67 | 67 | static ZEND_INI_MH(OnUpdateErrorReporting) /* {{{ */
|
@@ -134,7 +134,7 @@ static void print_hash(zend_write_func_t write_func, HashTable *ht, int indent,
|
134 | 134 | {
|
135 | 135 | zval *tmp;
|
136 | 136 | zend_string *string_key;
|
137 |
| - zend_uint_t num_key; |
| 137 | + zend_ulong num_key; |
138 | 138 | int i;
|
139 | 139 |
|
140 | 140 | for (i = 0; i < indent; i++) {
|
@@ -193,7 +193,7 @@ static void print_flat_hash(HashTable *ht TSRMLS_DC) /* {{{ */
|
193 | 193 | {
|
194 | 194 | zval *tmp;
|
195 | 195 | zend_string *string_key;
|
196 |
| - zend_uint_t num_key; |
| 196 | + zend_ulong num_key; |
197 | 197 | int i = 0;
|
198 | 198 |
|
199 | 199 | ZEND_HASH_FOREACH_KEY_VAL_IND(ht, num_key, string_key, tmp) {
|
@@ -226,23 +226,23 @@ ZEND_API int zend_make_printable_zval(zval *expr, zval *expr_copy TSRMLS_DC) /*
|
226 | 226 | break;
|
227 | 227 | case IS_TRUE:
|
228 | 228 | if (CG(one_char_string)['1']) {
|
229 |
| - ZVAL_INT_STR(expr_copy, CG(one_char_string)['1']); |
| 229 | + ZVAL_LONG_STR(expr_copy, CG(one_char_string)['1']); |
230 | 230 | } else {
|
231 |
| - ZVAL_NEW_STR(expr_copy, STR_INIT("1", 1, 0)); |
| 231 | + ZVAL_NEW_STR(expr_copy, zend_string_init("1", 1, 0)); |
232 | 232 | }
|
233 | 233 | break;
|
234 | 234 | case IS_RESOURCE: {
|
235 |
| - char buf[sizeof("Resource id #") + MAX_LENGTH_OF_ZEND_INT]; |
| 235 | + char buf[sizeof("Resource id #") + MAX_LENGTH_OF_LONG]; |
236 | 236 | int len;
|
237 | 237 |
|
238 | 238 | len = snprintf(buf, sizeof(buf), "Resource id #" ZEND_INT_FMT, Z_RES_HANDLE_P(expr));
|
239 |
| - ZVAL_NEW_STR(expr_copy, STR_INIT(buf, len, 0)); |
| 239 | + ZVAL_NEW_STR(expr_copy, zend_string_init(buf, len, 0)); |
240 | 240 | }
|
241 | 241 | break;
|
242 | 242 | case IS_ARRAY:
|
243 | 243 | zend_error(E_NOTICE, "Array to string conversion");
|
244 | 244 | // TODO: use interned string ???
|
245 |
| - ZVAL_NEW_STR(expr_copy, STR_INIT("Array", sizeof("Array") - 1, 0)); |
| 245 | + ZVAL_NEW_STR(expr_copy, zend_string_init("Array", sizeof("Array") - 1, 0)); |
246 | 246 | break;
|
247 | 247 | case IS_OBJECT:
|
248 | 248 | if (Z_OBJ_HANDLER_P(expr, cast_object)) {
|
@@ -278,7 +278,7 @@ ZEND_API int zend_make_printable_zval(zval *expr, zval *expr_copy TSRMLS_DC) /*
|
278 | 278 | case IS_REFERENCE:
|
279 | 279 | expr = Z_REFVAL_P(expr);
|
280 | 280 | if (Z_TYPE_P(expr) == IS_STRING) {
|
281 |
| - ZVAL_STR(expr_copy, STR_COPY(Z_STR_P(expr))); |
| 281 | + ZVAL_STR(expr_copy, zend_string_copy(Z_STR_P(expr))); |
282 | 282 | return 1;
|
283 | 283 | }
|
284 | 284 | goto again;
|
@@ -307,7 +307,7 @@ ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int in
|
307 | 307 | write_func(str->val, len);
|
308 | 308 | }
|
309 | 309 |
|
310 |
| - STR_RELEASE(str); |
| 310 | + zend_string_release(str); |
311 | 311 | return len;
|
312 | 312 | }
|
313 | 313 | /* }}} */
|
@@ -343,7 +343,7 @@ ZEND_API void zend_print_flat_zval_r(zval *expr TSRMLS_DC) /* {{{ */
|
343 | 343 | zend_printf("%s Object (", "Unknown Class");
|
344 | 344 | }
|
345 | 345 | if (class_name) {
|
346 |
| - STR_RELEASE(class_name); |
| 346 | + zend_string_release(class_name); |
347 | 347 | }
|
348 | 348 | if (Z_OBJ_HANDLER_P(expr, get_properties)) {
|
349 | 349 | 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
|
406 | 406 | }
|
407 | 407 | ZEND_PUTS_EX(" Object\n");
|
408 | 408 | if (class_name) {
|
409 |
| - STR_RELEASE(class_name); |
| 409 | + zend_string_release(class_name); |
410 | 410 | }
|
411 | 411 | if ((properties = Z_OBJDEBUG_P(expr, is_temp)) == NULL) {
|
412 | 412 | break;
|
@@ -739,7 +739,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions TS
|
739 | 739 | zend_interned_strings_init(TSRMLS_C);
|
740 | 740 | zend_startup_builtin_functions(TSRMLS_C);
|
741 | 741 | zend_register_standard_constants(TSRMLS_C);
|
742 |
| - zend_register_auto_global(STR_INIT("GLOBALS", sizeof("GLOBALS") - 1, 1), 1, php_auto_globals_create_globals TSRMLS_CC); |
| 742 | + zend_register_auto_global(zend_string_init("GLOBALS", sizeof("GLOBALS") - 1, 1), 1, php_auto_globals_create_globals TSRMLS_CC); |
743 | 743 |
|
744 | 744 | #ifndef ZTS
|
745 | 745 | zend_init_rsrc_plist(TSRMLS_C);
|
@@ -972,7 +972,7 @@ ZEND_API void zend_deactivate(TSRMLS_D) /* {{{ */
|
972 | 972 | /* }}} */
|
973 | 973 |
|
974 | 974 | BEGIN_EXTERN_C()
|
975 |
| -ZEND_API void zend_message_dispatcher(zend_int_t message, const void *data TSRMLS_DC) /* {{{ */ |
| 975 | +ZEND_API void zend_message_dispatcher(zend_long message, const void *data TSRMLS_DC) /* {{{ */ |
976 | 976 | {
|
977 | 977 | if (zend_message_dispatcher_p) {
|
978 | 978 | zend_message_dispatcher_p(message, data TSRMLS_CC);
|
@@ -1152,21 +1152,21 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
|
1152 | 1152 | #endif
|
1153 | 1153 | va_copy(usr_copy, args);
|
1154 | 1154 | len = zend_vspprintf(&str, 0, format, usr_copy);
|
1155 |
| - ZVAL_NEW_STR(¶ms[1], STR_INIT(str, len, 0)); |
| 1155 | + ZVAL_NEW_STR(¶ms[1], zend_string_init(str, len, 0)); |
1156 | 1156 | efree(str);
|
1157 | 1157 | #ifdef va_copy
|
1158 | 1158 | va_end(usr_copy);
|
1159 | 1159 | #endif
|
1160 | 1160 |
|
1161 |
| - ZVAL_INT(¶ms[0], type); |
| 1161 | + ZVAL_LONG(¶ms[0], type); |
1162 | 1162 |
|
1163 | 1163 | if (error_filename) {
|
1164 | 1164 | ZVAL_STRING(¶ms[2], error_filename);
|
1165 | 1165 | } else {
|
1166 | 1166 | ZVAL_NULL(¶ms[2]);
|
1167 | 1167 | }
|
1168 | 1168 |
|
1169 |
| - ZVAL_INT(¶ms[3], error_lineno); |
| 1169 | + ZVAL_LONG(¶ms[3], error_lineno); |
1170 | 1170 |
|
1171 | 1171 | symbol_table = zend_rebuild_symbol_table(TSRMLS_C);
|
1172 | 1172 |
|
@@ -1293,7 +1293,7 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval *retval, int file_cou
|
1293 | 1293 | int i;
|
1294 | 1294 | zend_file_handle *file_handle;
|
1295 | 1295 | zend_op_array *op_array;
|
1296 |
| - zend_int_t orig_interactive = CG(interactive); |
| 1296 | + zend_long orig_interactive = CG(interactive); |
1297 | 1297 |
|
1298 | 1298 | va_start(files, file_count);
|
1299 | 1299 | for (i = 0; i < file_count; i++) {
|
@@ -1390,7 +1390,7 @@ void free_estring(char **str_p) /* {{{ */
|
1390 | 1390 | void free_string_zval(zval *zv) /* {{{ */
|
1391 | 1391 | {
|
1392 | 1392 | zend_string *str = Z_PTR_P(zv);
|
1393 |
| - STR_RELEASE(str); |
| 1393 | + zend_string_release(str); |
1394 | 1394 | }
|
1395 | 1395 | /* }}} */
|
1396 | 1396 |
|
|
0 commit comments