# HG changeset patch # User Petter T. # Date 1698423567 -7200 # Fri Oct 27 18:19:27 2023 +0200 # Node ID 8d58cf0f6d3477f64cc0dd94e12751f571732cb2 # Parent 4c643f660de4c4580f5ee57c7e631ca519250db0 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 diff -r 4c643f660de4 -r 8d58cf0f6d34 libinterp/octave-value/ov-fcn.h --- 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; }