bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-readline] passing data callback of rl_add_defun


From: Tom Tromey
Subject: [Bug-readline] passing data callback of rl_add_defun
Date: Sun, 02 Sep 2018 16:37:11 -0600

Hi.

I'd like to be able to let users add new readline functions via a
scripting language.  To this end, what I'd like is to be able to pass a
bit of arbitrary data to rl_add_defun or rl_bind_key, and then have this
data be later passed, verbatim, to the callback.

So, something like:

 typedef int rl_command_funcx_t (int, int, void *);
 int rl_add_defunx (const char *name, rl_command_funcx_t *function,
                    void *user_data, int key)

(The names here are just placeholders.)

I can take a stab at this if desired.

Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]