diff options
author | Anatol Belski <ab@php.net> | 2014-07-02 10:27:59 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-07-02 10:27:59 +0200 |
commit | 84876850ff3e50ee7b85abc7261bdf9038d65e4b (patch) | |
tree | 091e7474679a1b6700459d6db2e36e0ac9272397 /sapi/phpdbg/phpdbg_prompt.c | |
parent | 0e7bf92129f608c44f4d5bd51139ec2bd85fecc8 (diff) | |
parent | 96783bdfb79b33646dc916d4b93bc33b78d70c4c (diff) | |
download | php-git-84876850ff3e50ee7b85abc7261bdf9038d65e4b.tar.gz |
Merge remote-tracking branch 'origin/str_size_and_int64_56_backport' into str_size_and_int64
* origin/str_size_and_int64_56_backport: (178 commits)
fix integer overflow in {stream,file}_{get,put}_contents()
add some missing NEWS entries
NEWS block for 5.6.0RC3
Fix ext/pgsql builds with libpq < 7.3.
updated libs_version.txt
updated libs_version.txt
updated libmagic.patch in 5.6+
updated libmagic.patch
Fixed possible crash because of race conditions on modifying constants in shared memory
remove the NEWS entry for the reverted fpm fix
remove the NEWS entry for the reverted fpm fix
remove the NEWS entry for the reverted fpm fix
Revert "Fix Bug #67530 error_log=syslog ignored"
--enable-fpm for the travis build
fix the last fpm NEWS entry, the other bug is related, but not the same what we fixed here
NEWS
NEWS
Fix bug #67091: make install fails to install libphp5.so on FreeBSD 10.0
adding NEWS entry for the fix for bug #65641
Updated NEWS file for recent phpdbg fixes
...
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_prompt.c | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 122e46bcaa..240b5c9987 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -38,8 +38,6 @@ #include "phpdbg_lexer.h" #include "phpdbg_parser.h" -int yyparse(phpdbg_param_t *stack, yyscan_t scanner); - /* {{{ command declarations */ const phpdbg_command_t phpdbg_prompt_commands[] = { PHPDBG_COMMAND_D(exec, "set execution context", 'e', NULL, "s"), @@ -248,20 +246,10 @@ void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_ char *why = NULL; char *input = phpdbg_read_input(cmd TSRMLS_CC); phpdbg_param_t stack; - yyscan_t scanner; - YY_BUFFER_STATE state; phpdbg_init_param(&stack, STACK_PARAM); - - if (yylex_init(&scanner)) { - phpdbg_error( - "could not initialize scanner"); - break; - } - state = yy_scan_string(input, scanner); - - if (yyparse(&stack, scanner) <= 0) { + if (phpdbg_do_parse(&stack, input TSRMLS_CC) <= 0) { switch (phpdbg_stack_execute(&stack, &why TSRMLS_CC)) { case FAILURE: // if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) { @@ -274,15 +262,12 @@ void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_ break; } } - + if (why) { free(why); why = NULL; } - - yy_delete_buffer(state, scanner); - yylex_destroy(scanner); - + phpdbg_stack_free(&stack); phpdbg_destroy_input(&input TSRMLS_CC); } @@ -747,6 +732,11 @@ PHPDBG_COMMAND(print) /* {{{ */ #else phpdbg_writeln("Readline\tno"); #endif +#ifdef HAVE_LIBEDIT + phpdbg_writeln("Libedit\t\tyes"); +#else + phpdbg_writeln("Libedit\t\tno"); +#endif phpdbg_writeln("Exec\t\t%s", PHPDBG_G(exec) ? PHPDBG_G(exec) : "none"); phpdbg_writeln("Compiled\t%s", PHPDBG_G(ops) ? "yes" : "no"); @@ -1014,20 +1004,9 @@ int phpdbg_interactive(TSRMLS_D) /* {{{ */ if (input) { do { - yyscan_t scanner; - YY_BUFFER_STATE state; - phpdbg_init_param(&stack, STACK_PARAM); - if (yylex_init(&scanner)) { - phpdbg_error( - "could not initialize scanner"); - return FAILURE; - } - - state = yy_scan_string(input, scanner); - - if (yyparse(&stack, scanner) <= 0) { + if (phpdbg_do_parse(&stack, input TSRMLS_CC) <= 0) { switch (ret = phpdbg_stack_execute(&stack, &why TSRMLS_CC)) { case FAILURE: if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) { @@ -1061,9 +1040,6 @@ int phpdbg_interactive(TSRMLS_D) /* {{{ */ why = NULL; } - yy_delete_buffer(state, scanner); - yylex_destroy(scanner); - phpdbg_stack_free(&stack); phpdbg_destroy_input(&input TSRMLS_CC); |