Mercurial > octave
diff src/toplev.cc @ 7719:87eda1f8faaa
octave_user_code: new base class for octave_user_script and octave_user_function
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 16 Apr 2008 22:08:15 -0400 |
parents | 6070c3bd69c4 |
children | bb614b3883a9 |
line wrap: on
line diff
--- a/src/toplev.cc Wed Apr 16 21:50:59 2008 -0400 +++ b/src/toplev.cc Wed Apr 16 22:08:15 2008 -0400 @@ -133,18 +133,18 @@ return retval; } -octave_function * -octave_call_stack::do_caller_user_script_or_function (void) +octave_user_code * +octave_call_stack::do_caller_user_code (void) { - octave_function *retval = 0; + octave_user_code *retval = 0; for (iterator p = cs.begin (); p != cs.end (); p++) { octave_function *f = *p; - if (f && (f->is_user_script () || f->is_user_function ())) + if (f && f->is_user_code ()) { - retval = f; + retval = dynamic_cast<octave_user_code *> (f); break; } }