# HG changeset patch # User John W. Eaton # Date 1364318285 14400 # Node ID 4e7a9f950cdcce34ce078406cf52039f293bcc02 # Parent effe80808118ab734027fc165c04baec38154636 return hook function ids * input.cc (Fadd_pre_input_event_hook, Fadd_post_input_event_hook): Return hook function id. diff -r effe80808118 -r 4e7a9f950cdc libinterp/interpfcn/input.cc --- a/libinterp/interpfcn/input.cc Tue Mar 26 09:48:18 2013 -0700 +++ b/libinterp/interpfcn/input.cc Tue Mar 26 13:18:05 2013 -0400 @@ -1275,7 +1275,7 @@ @seealso{remove_pre_input_event_hook}\n\ @end deftypefn") { - octave_value_list retval; + octave_value retval; int nargin = args.length (); @@ -1289,7 +1289,11 @@ hook_function hook_fcn (args(0), user_data); if (! error_state) - pre_input_event_hook_fcn_map[hook_fcn.id ()] = hook_fcn; + { + pre_input_event_hook_fcn_map[hook_fcn.id ()] = hook_fcn; + + retval = hook_fcn.id (); + } else error ("add_pre_input_event_hook: expecting string as first arg"); } @@ -1464,7 +1468,7 @@ @seealso{remove_post_input_event_hook}\n\ @end deftypefn") { - octave_value_list retval; + octave_value retval; int nargin = args.length (); @@ -1478,7 +1482,11 @@ hook_function hook_fcn (args(0), user_data); if (! error_state) - post_input_event_hook_fcn_map[hook_fcn.id ()] = hook_fcn; + { + post_input_event_hook_fcn_map[hook_fcn.id ()] = hook_fcn; + + retval = hook_fcn.id (); + } else error ("add_post_input_event_hook: expecting string as first arg"); }