changeset 23143:898c33f4b9c0

declare some functions that are only used once "static" * debug.cc (do_dbtype): Now static. * load-save.cc (find_file_to_load): Now static. * variables.cc (symbol_exist): Now static. * variables.h (symbol_exist): Delete decl.
author John W. Eaton <jwe@octave.org>
date Fri, 03 Feb 2017 19:54:32 -0500
parents 36983345732b
children c9082b847f79
files libinterp/corefcn/debug.cc libinterp/corefcn/load-save.cc libinterp/corefcn/variables.cc libinterp/corefcn/variables.h
diffstat 4 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/debug.cc	Fri Feb 03 07:31:08 2017 -0800
+++ b/libinterp/corefcn/debug.cc	Fri Feb 03 19:54:32 2017 -0500
@@ -563,7 +563,7 @@
   return ovl ();
 }
 
-void
+static void
 do_dbtype (std::ostream& os, const std::string& name, int start, int end)
 {
   std::string ff = fcn_file_in_path (name);
--- a/libinterp/corefcn/load-save.cc	Fri Feb 03 07:31:08 2017 -0800
+++ b/libinterp/corefcn/load-save.cc	Fri Feb 03 19:54:32 2017 -0500
@@ -488,7 +488,7 @@
   return retval;
 }
 
-std::string
+static std::string
 find_file_to_load (const std::string& name, const std::string& orig_name)
 {
   std::string fname = find_data_file_in_load_path ("load", name, true);
--- a/libinterp/corefcn/variables.cc	Fri Feb 03 07:31:08 2017 -0800
+++ b/libinterp/corefcn/variables.cc	Fri Feb 03 19:54:32 2017 -0500
@@ -378,8 +378,8 @@
 %!error isglobal (1)
 */
 
-int
-symbol_exist (const std::string& name, const std::string& type)
+static int
+symbol_exist (const std::string& name, const std::string& type = "any")
 {
   if (octave::is_keyword (name))
     return 0;
--- a/libinterp/corefcn/variables.h	Fri Feb 03 07:31:08 2017 -0800
+++ b/libinterp/corefcn/variables.h	Fri Feb 03 19:54:32 2017 -0500
@@ -74,9 +74,6 @@
 extern OCTINTERP_API bool
 looks_like_struct (const std::string& text, char prev_char);
 
-extern OCTINTERP_API int
-symbol_exist (const std::string& name, const std::string& type = "any");
-
 extern OCTINTERP_API std::string
 unique_symbol_name (const std::string& basename);