Mercurial > octave-nkf
changeset 10260:14d5fee02b3b
basic support for comparing function handles
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 03 Feb 2010 12:49:17 +0100 |
parents | 65b41bc71f09 |
children | a4fb4675accb |
files | scripts/ChangeLog scripts/general/private/__isequal__.m src/ChangeLog src/OPERATORS/module.mk |
diffstat | 4 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog Wed Feb 03 17:05:02 2010 -0500 +++ b/scripts/ChangeLog Wed Feb 03 12:49:17 2010 +0100 @@ -1,3 +1,7 @@ +2010-02-03 Jaroslav Hajek <highegg@gmail.com> + + * general/private/__isequal__.m: Handle function handles. + 2010-02-01 David Bateman <dbateman@free.fr> * plot/__go_draw_axes__.m (get_old_gnuplot_color): Remove as
--- a/scripts/general/private/__isequal__.m Wed Feb 03 17:05:02 2010 -0500 +++ b/scripts/general/private/__isequal__.m Wed Feb 03 12:49:17 2010 +0100 @@ -141,6 +141,11 @@ endfor t = all (strcmp (reshape (x, 1, []), strings)); + elseif (isa (x, "function_handle")) + + ## The == operator is overloaded for handles. + t = all (cellfun (@eq, {x}, varargin)); + else ## Check the numeric types.
--- a/src/ChangeLog Wed Feb 03 17:05:02 2010 -0500 +++ b/src/ChangeLog Wed Feb 03 12:49:17 2010 +0100 @@ -1,3 +1,8 @@ +2010-02-03 Jaroslav Hajek <highegg@gmail.com> + + * OPERATORS/op-fcn.cc: New source. + * OPERATORS/module.mk: Include it. + 2010-02-03 John W. Eaton <jwe@octave.org> * file-io.cc: Assume we have fcntl.h and sys/stat.h.
--- a/src/OPERATORS/module.mk Wed Feb 03 17:05:02 2010 -0500 +++ b/src/OPERATORS/module.mk Wed Feb 03 12:49:17 2010 +0100 @@ -53,6 +53,7 @@ OPERATORS/op-fcm-fm.cc \ OPERATORS/op-fcm-fs.cc \ OPERATORS/op-fcm-pm.cc \ + OPERATORS/op-fcn.cc \ OPERATORS/op-fcs-fcm.cc \ OPERATORS/op-fcs-fcs.cc \ OPERATORS/op-fcs-fm.cc \