php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54450 Missing functions with libedit
Submitted: 2011-04-02 09:34 UTC Modified: 2011-09-06 15:09 UTC
From: fedora at famillecollet dot com Assigned: bjori (profile)
Status: Closed Package: Readline related
PHP Version: 5.3.6 OS: GNU/Linux (Fedora 14)
Private report: No CVE-ID: None
 [2011-04-02 09:34 UTC] fedora at famillecollet dot com
Description:
------------
libedit (tested with version 3.0) provides "callback" functions, but php doesn't detects/provides them.


The attached patched 
- add detection for "rl_callback_read_char" when build with "--with-readline"
- add detection for "rl_on_new_line" which is only available when build "--with-readline"

Exemple from http://www.php.net/readline_callback_handler_install works.


Test script:
---------------
php  -r 'print_r(get_extension_funcs("readline"));'

Expected result:
----------------
Array
(
    [0] => readline
    [1] => readline_info
    [2] => readline_add_history
    [3] => readline_clear_history
    [4] => readline_read_history
    [5] => readline_write_history
    [6] => readline_completion_function
    [7] => readline_callback_handler_install
    [8] => readline_callback_read_char
    [9] => readline_callback_handler_remove
    [10] => readline_redisplay
)


Actual result:
--------------
Array
(
    [0] => readline
    [1] => readline_info
    [2] => readline_add_history
    [3] => readline_clear_history
    [4] => readline_read_history
    [5] => readline_write_history
    [6] => readline_completion_function
)


Patches

readline-libedit-5.3.7.patch (last revision 2011-07-29 05:36 UTC by Fedora at FamilleCollet dot com)
readline-libedit.patch (last revision 2011-04-02 07:35 UTC by fedora at famillecollet dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-06 10:13 UTC] bjori@php.net
-Assigned To: +Assigned To: bjori
 [2011-09-06 15:07 UTC] bjori@php.net
Automatic comment from SVN on behalf of bjori
Revision: http://svn.php.net/viewvc/?view=revision&revision=316265
Log: Fixed bug#54450 (callback function when built against libedit)
 [2011-09-06 15:09 UTC] bjori@php.net
-Status: Assigned +Status: Closed
 [2011-09-06 15:09 UTC] bjori@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC