Mercurial > octave-nkf
diff libinterp/octave-value/ov-class.cc @ 18316:ff311e5ff6d8
Don't call classdef-overloaded subsref from builtin calls.
* ov-class.cc (called_from_builtin): Moved to ov-base.cc.
* ov-base.cc (called_from_builtin): Moved from ov-class.cc.
* ov-base.h (called_from_builtin): Declare in octave API.
* ov-classdef.cc (octave_classdef::subsref): Don't call overloaded
subsref when called from "builtin".
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Mon, 20 Jan 2014 22:16:22 -0500 |
parents | 06eb893b9db6 |
children | 1e148ecdeedd |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-class.cc Mon Jan 20 14:10:42 2014 -0500 +++ b/libinterp/octave-value/ov-class.cc Mon Jan 20 22:16:22 2014 -0500 @@ -307,20 +307,6 @@ return retval; } -static bool -called_from_builtin (void) -{ - octave_function *fcn = octave_call_stack::caller (); - - // FIXME: we probably need a better check here, or some other - // mechanism to avoid overloaded functions when builtin is used. - // For example, what if someone overloads the builtin function? - // Also, are there other places where using builtin is not properly - // avoiding dispatch? - - return (fcn && fcn->name () == "builtin"); -} - Matrix octave_class::size (void) {