Mercurial > octave
changeset 32439:e77f4f571c73
Implement clone for octave_fcn_cache
Breaking closure cycles for nested stack frames could potentially cause
problems without clone implemented, as seen in bug #64778.
* ov-fcn.h: Implement clone
author | Petter T. |
---|---|
date | Fri, 27 Oct 2023 18:19:27 +0200 |
parents | a7a769c02a27 |
children | b36ac2c31cb2 |
files | libinterp/octave-value/ov-fcn.h |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-fcn.h Fri Oct 27 18:19:20 2023 +0200 +++ b/libinterp/octave-value/ov-fcn.h Fri Oct 27 18:19:27 2023 +0200 @@ -58,6 +58,9 @@ octave_fcn_cache (const std::string &name) :m_fcn_name (name) { } octave_fcn_cache () {} + octave_base_value * + clone () const { return new octave_fcn_cache (*this); } + bool is_function_cache (void) const { return true; } bool has_function_cache (void) const { return true; }