bjori                                    Tue, 06 Sep 2011 15:09:15 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=316266

Log:
Add a constant, READLINE_LIB, to be able to differenciate which lib is being 
used

Changed paths:
    U   php/php-src/branches/PHP_5_4/ext/readline/readline_cli.c
    U   php/php-src/trunk/ext/readline/readline_cli.c

Modified: php/php-src/branches/PHP_5_4/ext/readline/readline_cli.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/readline/readline_cli.c    2011-09-06 
15:07:24 UTC (rev 316265)
+++ php/php-src/branches/PHP_5_4/ext/readline/readline_cli.c    2011-09-06 
15:09:15 UTC (rev 316266)
@@ -715,6 +715,12 @@
        ZEND_INIT_MODULE_GLOBALS(cli_readline, cli_readline_init_globals, NULL);
        REGISTER_INI_ENTRIES();

+#if HAVE_LIBEDIT
+       REGISTER_STRING_CONSTANT("READLINE_LIB", "libedit", 
CONST_CS|CONST_PERSISTENT);
+#else
+       REGISTER_STRING_CONSTANT("READLINE_LIB", "readline", 
CONST_CS|CONST_PERSISTENT);
+#endif
+
        GET_SHELL_CB(cb);
        if (cb) {
                cb->cli_shell_write = readline_shell_write;

Modified: php/php-src/trunk/ext/readline/readline_cli.c
===================================================================
--- php/php-src/trunk/ext/readline/readline_cli.c       2011-09-06 15:07:24 UTC 
(rev 316265)
+++ php/php-src/trunk/ext/readline/readline_cli.c       2011-09-06 15:09:15 UTC 
(rev 316266)
@@ -715,6 +715,12 @@
        ZEND_INIT_MODULE_GLOBALS(cli_readline, cli_readline_init_globals, NULL);
        REGISTER_INI_ENTRIES();

+#if HAVE_LIBEDIT
+       REGISTER_STRING_CONSTANT("READLINE_LIB", "libedit", 
CONST_CS|CONST_PERSISTENT);
+#else
+       REGISTER_STRING_CONSTANT("READLINE_LIB", "readline", 
CONST_CS|CONST_PERSISTENT);
+#endif
+
        GET_SHELL_CB(cb);
        if (cb) {
                cb->cli_shell_write = readline_shell_write;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to