diff libinterp/corefcn/interpreter-private.cc @ 25993:f75bb9d659e0

eliminate global and file-scope static variables from load-save.cc (bug #54571) * interpreter-private.h, interpreter-private.cc (__get_load_save_system__): New function. * interpreter.h, interpreter.cc (interpreter::m_load_save_system, interpreter::get_load_save_system): New member variable and access function. * load-save.h, load-save.cc: Rewrite to use class for load/save configuration variables and functions. Change all uses.
author John W. Eaton <jwe@octave.org>
date Wed, 31 Oct 2018 18:22:23 -0400
parents 627d6bde9b8d
children f881d3e271d2
line wrap: on
line diff
--- a/libinterp/corefcn/interpreter-private.cc	Wed Oct 31 14:29:03 2018 -0700
+++ b/libinterp/corefcn/interpreter-private.cc	Wed Oct 31 18:22:23 2018 -0400
@@ -36,6 +36,7 @@
 #include "interpreter-private.h"
 #include "interpreter.h"
 #include "load-path.h"
+#include "load-save.h"
 #include "ov-classdef.h"
 #include "pager.h"
 #include "symtab.h"
@@ -90,6 +91,13 @@
     return interp.get_load_path ();
   }
 
+  load_save_system& __get_load_save_system__ (const std::string& who)
+  {
+    interpreter& interp = __get_interpreter__ (who);
+
+    return interp.get_load_save_system ();
+  }
+
   type_info& __get_type_info__ (const std::string& who)
   {
     interpreter& interp = __get_interpreter__ (who);