diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2016-12-22 00:40:54 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2016-12-22 00:40:54 +0100 |
commit | 728502fc2978dcf9286ac049a5dbfa74187c9746 (patch) | |
tree | 942598ac96c57dca8e18ba08ee85222715fa67a9 /sapi/phpdbg/phpdbg_list.c | |
parent | ed0602fe311662e303c87cd63f190c609ee55923 (diff) | |
parent | 3b2b080cbcdcadb97f9dd2db1a6e9e4200c34023 (diff) | |
download | php-git-728502fc2978dcf9286ac049a5dbfa74187c9746.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
Diffstat (limited to 'sapi/phpdbg/phpdbg_list.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_list.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index c222972761..a1138b4517 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -251,7 +251,6 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { memcpy(data.buf, bufptr, data.len); } memset(data.buf + data.len, 0, ZEND_MMAP_AHEAD + 1); - data.filename = filename; data.line[0] = 0; memset(&fake, 0, sizeof(fake)); @@ -284,10 +283,9 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { return NULL; } - dataptr->filename = estrdup(dataptr->filename); dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line); - zend_hash_str_add_ptr(&PHPDBG_G(file_sources), filename, strlen(filename), dataptr); - phpdbg_resolve_pending_file_break(filename); + zend_hash_add_ptr(&PHPDBG_G(file_sources), ret->filename, dataptr); + phpdbg_resolve_pending_file_break(ZSTR_VAL(ret->filename)); fake.opened_path = NULL; zend_file_handle_dtor(&fake); @@ -322,9 +320,7 @@ zend_op_array *phpdbg_init_compile_file(zend_file_handle *file, int type) { return NULL; } - filename = (char *)(file->opened_path ? ZSTR_VAL(file->opened_path) : file->filename); - - dataptr = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), filename, strlen(filename)); + dataptr = zend_hash_find_ptr(&PHPDBG_G(file_sources), op_array->filename); ZEND_ASSERT(dataptr != NULL); dataptr->op_array = *op_array; @@ -371,7 +367,6 @@ zend_op_array *phpdbg_compile_string(zval *source_string, char *filename) { dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line); zend_hash_add_ptr(&PHPDBG_G(file_sources), fake_name, dataptr); - dataptr->filename = estrndup(ZSTR_VAL(fake_name), ZSTR_LEN(fake_name)); zend_string_release(fake_name); dataptr->op_array = *op_array; |