com php-src: Merge branch 'PHP-7.1': sapi/phpdbg/phpdbg.c sapi/phpdbg/phpdbg_prompt.c
| From: | Bob Weinand | Date: | Wed, 21 Dec 2016 23:42:05 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.1': sapi/phpdbg/phpdbg.c sapi/phpdbg/phpdbg_prompt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96415@lists.php.net to get a copy of this message | ||
Commit: 5d7ce7274757451a536b3521debd8f89365b0349
Author: Bob Weinand <bobwei9@hotmail.com> Thu, 22 Dec 2016 00:42:05 +0100
Parents: 3df43437fe76a2f396b77c1e00e8c68c5038d1ce 728502fc2978dcf9286ac049a5dbfa74187c9746
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5d7ce7274757451a536b3521debd8f89365b0349
Log:
Merge branch 'PHP-7.1'
Changed paths:
MM sapi/phpdbg/phpdbg.c
MM sapi/phpdbg/phpdbg_prompt.c
Diff:
diff --cc sapi/phpdbg/phpdbg_prompt.c
index 572e0a2,4655702..ce8945a
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@@ -536,22 -539,20 +536,20 @@@ int phpdbg_compile_stdin(zend_string *c
if (PHPDBG_G(exec)) {
efree(PHPDBG_G(exec));
}
- PHPDBG_G(exec) = estrdup("-");
- PHPDBG_G(exec_len) = 1;
+ PHPDBG_G(exec) = estrdup("Standard input code");
+ PHPDBG_G(exec_len) = sizeof("Standard input code") - 1;
{ /* remove leading ?> from source */
int i;
+ /* remove trailing data after zero byte, used for avoiding conflicts in eval()'ed code
snippets */
- zend_string *source_path = strpprintf(0, "-%c%p", 0, PHPDBG_G(ops)->opcodes);
+ zend_string *source_path = strpprintf(0, "Standard input code%c%p", 0,
PHPDBG_G(ops)->opcodes);
phpdbg_file_source *data = zend_hash_find_ptr(&PHPDBG_G(file_sources), source_path);
dtor_func_t dtor = PHPDBG_G(file_sources).pDestructor;
PHPDBG_G(file_sources).pDestructor = NULL;
zend_hash_del(&PHPDBG_G(file_sources), source_path);
PHPDBG_G(file_sources).pDestructor = dtor;
- zend_hash_str_update_ptr(&PHPDBG_G(file_sources), "-", 1, data);
+ zend_hash_str_update_ptr(&PHPDBG_G(file_sources), "Standard input code",
sizeof("Standard input code")-1, data);
zend_string_release(source_path);
- efree(data->filename);
- data->filename = estrdup("Standard input code");
-
for (i = 1; i <= data->lines; i++) {
data->line[i] -= 2;
}