diff options
author | Anatol Belski <ab@php.net> | 2016-12-22 14:32:02 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-12-22 14:32:02 +0100 |
commit | afb6ca2566691a673b7e638ffd7e3181e21d80a3 (patch) | |
tree | 43ec7c52c51ac2b3245c7d2c45466a220f6908eb /sapi/phpdbg | |
parent | ce97ead3997c238f1566ee472ebc9b77e62124a5 (diff) | |
download | php-git-afb6ca2566691a673b7e638ffd7e3181e21d80a3.tar.gz |
Finish remaining replacement uint => uint32_t
Tthe core should be normalized now, no uints anymore
Diffstat (limited to 'sapi/phpdbg')
-rw-r--r-- | sapi/phpdbg/phpdbg_bp.c | 4 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg_bp.h | 2 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg_list.c | 24 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg_list.h | 6 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg_prompt.c | 6 |
5 files changed, 21 insertions, 21 deletions
diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c index c7e36d6da9..fd5589c0d1 100644 --- a/sapi/phpdbg/phpdbg_bp.c +++ b/sapi/phpdbg/phpdbg_bp.c @@ -324,7 +324,7 @@ PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, size_t path_len, lo zend_string_release(path_str); } /* }}} */ -PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uint filelen, zend_string *cur, HashTable *fileht) /* {{{ */ +PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uint32_t filelen, zend_string *cur, HashTable *fileht) /* {{{ */ { phpdbg_debug("file: %s, filelen: %u, cur: %s, curlen %u, pos: %c, memcmp: %d\n", file, filelen, ZSTR_VAL(cur), ZSTR_LEN(cur), filelen > ZSTR_LEN(cur) ? file[filelen - ZSTR_LEN(cur) - 1] : '?', filelen > ZSTR_LEN(cur) ? memcmp(file + filelen - ZSTR_LEN(cur), ZSTR_VAL(cur), ZSTR_LEN(cur)) : 0); @@ -373,7 +373,7 @@ PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uin PHPDBG_API void phpdbg_resolve_pending_file_break(const char *file) /* {{{ */ { HashTable *fileht; - uint filelen = strlen(file); + uint32_t filelen = strlen(file); zend_string *cur; phpdbg_debug("was compiled: %s\n", file); diff --git a/sapi/phpdbg/phpdbg_bp.h b/sapi/phpdbg/phpdbg_bp.h index 7daafe48c1..4a1f6434bc 100644 --- a/sapi/phpdbg/phpdbg_bp.h +++ b/sapi/phpdbg/phpdbg_bp.h @@ -121,7 +121,7 @@ typedef struct _phpdbg_breakcond_t { PHPDBG_API void phpdbg_resolve_op_array_breaks(zend_op_array *op_array); PHPDBG_API int phpdbg_resolve_op_array_break(phpdbg_breakopline_t *brake, zend_op_array *op_array); PHPDBG_API int phpdbg_resolve_opline_break(phpdbg_breakopline_t *new_break); -PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uint filelen, zend_string *cur, HashTable *fileht); +PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uint32_t filelen, zend_string *cur, HashTable *fileht); PHPDBG_API void phpdbg_resolve_pending_file_break(const char *file); /* }}} */ /* {{{ Breakpoint Creation API */ diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index a1138b4517..2219198cfe 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -129,9 +129,9 @@ PHPDBG_LIST(class) /* {{{ */ return SUCCESS; } /* }}} */ -void phpdbg_list_file(zend_string *filename, uint count, int offset, uint highlight) /* {{{ */ +void phpdbg_list_file(zend_string *filename, uint32_t count, int offset, uint32_t highlight) /* {{{ */ { - uint line, lastline; + uint32_t line, lastline; phpdbg_file_source *data; if (!(data = zend_hash_find_ptr(&PHPDBG_G(file_sources), filename))) { @@ -153,8 +153,8 @@ void phpdbg_list_file(zend_string *filename, uint count, int offset, uint highli phpdbg_xml("<list %r file=\"%s\">", ZSTR_VAL(filename)); for (line = offset; line < lastline;) { - uint linestart = data->line[line++]; - uint linelen = data->line[line] - linestart; + uint32_t linestart = data->line[line++]; + uint32_t linelen = data->line[line] - linestart; char *buffer = data->buf + linestart; if (!highlight) { @@ -237,7 +237,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { zend_file_handle fake; zend_op_array *ret; char *filename; - uint line; + uint32_t line; char *bufptr, *endptr; if (zend_stream_fixup(file, &bufptr, &data.len) == FAILURE) { @@ -261,11 +261,11 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { fake.filename = filename; fake.opened_path = file->opened_path; - *(dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint) * data.len)) = data; + *(dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint32_t) * data.len)) = data; for (line = 0, bufptr = data.buf - 1, endptr = data.buf + data.len; ++bufptr < endptr;) { if (*bufptr == '\n') { - dataptr->line[++line] = (uint)(bufptr - data.buf) + 1; + dataptr->line[++line] = (uint32_t)(bufptr - data.buf) + 1; } } dataptr->lines = ++line; @@ -283,7 +283,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { return NULL; } - dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line); + dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint32_t) * line); zend_hash_add_ptr(&PHPDBG_G(file_sources), ret->filename, dataptr); phpdbg_resolve_pending_file_break(ZSTR_VAL(ret->filename)); @@ -335,20 +335,20 @@ zend_op_array *phpdbg_compile_string(zval *source_string, char *filename) { zend_string *fake_name; zend_op_array *op_array; phpdbg_file_source *dataptr; - uint line; + uint32_t line; char *bufptr, *endptr; if (PHPDBG_G(flags) & PHPDBG_IN_EVAL) { return PHPDBG_G(compile_string)(source_string, filename); } - dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint) * Z_STRLEN_P(source_string)); + dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint32_t) * Z_STRLEN_P(source_string)); dataptr->buf = estrndup(Z_STRVAL_P(source_string), Z_STRLEN_P(source_string)); dataptr->len = Z_STRLEN_P(source_string); dataptr->line[0] = 0; for (line = 0, bufptr = dataptr->buf - 1, endptr = dataptr->buf + dataptr->len; ++bufptr < endptr;) { if (*bufptr == '\n') { - dataptr->line[++line] = (uint)(bufptr - dataptr->buf) + 1; + dataptr->line[++line] = (uint32_t)(bufptr - dataptr->buf) + 1; } } dataptr->lines = ++line; @@ -364,7 +364,7 @@ zend_op_array *phpdbg_compile_string(zval *source_string, char *filename) { fake_name = strpprintf(0, "%s%c%p", filename, 0, op_array->opcodes); - dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line); + dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint32_t) * line); zend_hash_add_ptr(&PHPDBG_G(file_sources), fake_name, dataptr); zend_string_release(fake_name); diff --git a/sapi/phpdbg/phpdbg_list.h b/sapi/phpdbg/phpdbg_list.h index 9adb69b6c9..2768a42ddd 100644 --- a/sapi/phpdbg/phpdbg_list.h +++ b/sapi/phpdbg/phpdbg_list.h @@ -34,7 +34,7 @@ PHPDBG_LIST(func); void phpdbg_list_function_byname(const char *, size_t); void phpdbg_list_function(const zend_function *); -void phpdbg_list_file(zend_string *, uint, int, uint); +void phpdbg_list_file(zend_string *, uint32_t, int, uint32_t); extern const phpdbg_command_t phpdbg_list_commands[]; @@ -48,8 +48,8 @@ typedef struct { void *map; #endif zend_op_array op_array; - uint lines; - uint line[1]; + uint32_t lines; + uint32_t line[1]; } phpdbg_file_source; #endif /* PHPDBG_LIST_H */ diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index ce8945ac6a..a96563352d 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -608,11 +608,11 @@ int phpdbg_compile(void) /* {{{ */ zend_hash_del(&PHPDBG_G(file_sources), PHPDBG_G(ops)->filename); PHPDBG_G(file_sources).pDestructor = dtor; - data = erealloc(data, sizeof(phpdbg_file_source) + sizeof(uint) * ++data->lines); - memmove(data->line + 1, data->line, sizeof(uint) * data->lines); + data = erealloc(data, sizeof(phpdbg_file_source) + sizeof(uint32_t) * ++data->lines); + memmove(data->line + 1, data->line, sizeof(uint32_t) * data->lines); data->line[0] = 0; data->buf = erealloc(data->buf, data->len + start_line_len); - memmove(data->buf + start_line_len, data->buf, data->len * sizeof(uint)); + memmove(data->buf + start_line_len, data->buf, data->len * sizeof(uint32_t)); memcpy(data->buf, start_line, start_line_len); efree(start_line); data->len += start_line_len; |