# HG changeset patch # User jwe # Date 1167499775 0 # Node ID 0c3537d2a84465bc17bd0252ab78fffaca22c023 # Parent ba9db82d85a888372976c70f28989f7443d1a435 [project @ 2006-12-30 17:29:34 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2006-12-30 John W. Eaton + + * sparse/spfun.m: Check for "function_handle" not "function handle". + * plot/fplot.m: Likewise. Use isa instead of strcmp + class. + 2006-12-27 Søren Hauberg * image/imshow.m: Strip NaNs from image. diff --git a/scripts/plot/fplot.m b/scripts/plot/fplot.m --- a/scripts/plot/fplot.m +++ b/scripts/plot/fplot.m @@ -44,8 +44,7 @@ x = linspace (limits(1), limits(2), n)'; - if (strcmp (class (fn), "inline function") - || strcmp (class (fn), "function handle")) + if (isa (fn, "inline function") || isa (fn, "function_handle")) y = fn (x); elseif (all (isalnum (fn))) y = feval (fn, x); diff --git a/scripts/sparse/spfun.m b/scripts/sparse/spfun.m --- a/scripts/sparse/spfun.m +++ b/scripts/sparse/spfun.m @@ -35,7 +35,7 @@ [m,n] = size(s); end - if (isa (f, "function handle") || isa (f, "inline function")) + if (isa (f, "function_handle") || isa (f, "inline function")) t = sparse(i,j,f(v),m,n); else t = sparse(i,j,feval(f,v),m,n); diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-12-30 John W. Eaton + + * ov-fcn-inline.cc: For compatibility, class id is + "function_handle", not "inline function". + 2006-12-27 John W. Eaton * Makefile.in (%.df : %.cc): Insert a "do not edit" notice in the diff --git a/src/ov-fcn-inline.cc b/src/ov-fcn-inline.cc --- a/src/ov-fcn-inline.cc +++ b/src/ov-fcn-inline.cc @@ -51,7 +51,7 @@ DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_fcn_inline, "inline function", - "inline function"); + "function_handle"); octave_fcn_inline::octave_fcn_inline (const std::string& f, const string_vector& a,