Browse Source

dtoolutil: Change export macros to EXP*_DTOOL_DTOOLUTIL

This is for consistency with `panda`, which follows this format.
Sam Edwards 7 years ago
parent
commit
ad5b45811d

+ 3 - 0
dtool/src/dtoolbase/dtoolsymbols.h

@@ -103,6 +103,9 @@
 #define EXPCL_DTOOL_DTOOLBASE EXPCL_DTOOL
 #define EXPTP_DTOOL_DTOOLBASE EXPTP_DTOOL
 
+#define EXPCL_DTOOL_DTOOLUTIL EXPCL_DTOOL
+#define EXPTP_DTOOL_DTOOLUTIL EXPTP_DTOOL
+
 
 /* These two are always defined empty, because pystub is statically
    built.  But we leave the symbol around in case we change our minds

+ 2 - 2
dtool/src/dtoolutil/dSearchPath.h

@@ -25,9 +25,9 @@
  * traditional searchpath-style string, e.g.  a list of directory names
  * delimited by spaces or colons, but it can also be built up explicitly.
  */
-class EXPCL_DTOOL DSearchPath {
+class EXPCL_DTOOL_DTOOLUTIL DSearchPath {
 PUBLISHED:
-  class EXPCL_DTOOL Results {
+  class EXPCL_DTOOL_DTOOLUTIL Results {
   PUBLISHED:
     Results();
     Results(const Results &copy);

+ 1 - 1
dtool/src/dtoolutil/executionEnvironment.h

@@ -26,7 +26,7 @@
  * at the time of execution.  This is encapsulated to support accessing these
  * things during static init time, which seems to be risky at best.
  */
-class EXPCL_DTOOL ExecutionEnvironment {
+class EXPCL_DTOOL_DTOOLUTIL ExecutionEnvironment {
 private:
   ExecutionEnvironment();
 

+ 1 - 1
dtool/src/dtoolutil/filename.h

@@ -36,7 +36,7 @@ class DSearchPath;
  * for file existence and searching a searchpath, as well as the best way to
  * open an fstream for reading or writing.
  */
-class EXPCL_DTOOL Filename {
+class EXPCL_DTOOL_DTOOLUTIL Filename {
 PUBLISHED:
   enum Type {
     // These type values must fit within the bits allocated for F_type, below.

+ 1 - 1
dtool/src/dtoolutil/globPattern.h

@@ -29,7 +29,7 @@
  * the pattern or not.  It can be used, for example, to scan a directory for
  * all files matching a particular pattern.
  */
-class EXPCL_DTOOL GlobPattern {
+class EXPCL_DTOOL_DTOOLUTIL GlobPattern {
 PUBLISHED:
   INLINE GlobPattern(const string &pattern = string());
   INLINE GlobPattern(const GlobPattern &copy);

+ 1 - 1
dtool/src/dtoolutil/lineStream.h

@@ -28,7 +28,7 @@
  * otherwise affected when a line of text is extracted.  More text can still
  * be written to it and continuously extracted.
  */
-class EXPCL_DTOOL LineStream : public ostream {
+class EXPCL_DTOOL_DTOOLUTIL LineStream : public ostream {
 PUBLISHED:
   INLINE LineStream();
 

+ 1 - 1
dtool/src/dtoolutil/lineStreamBuf.h

@@ -23,7 +23,7 @@
  * whose contents can be continuously extracted as a sequence of lines of
  * text.
  */
-class EXPCL_DTOOL LineStreamBuf : public streambuf {
+class EXPCL_DTOOL_DTOOLUTIL LineStreamBuf : public streambuf {
 public:
   LineStreamBuf();
   virtual ~LineStreamBuf();

+ 4 - 4
dtool/src/dtoolutil/load_dso.h

@@ -22,20 +22,20 @@
 // otherwise on success.  If the filename is not absolute, searches the path.
 // If the path is empty, searches the dtool directory.
 
-EXPCL_DTOOL void *
+EXPCL_DTOOL_DTOOLUTIL void *
 load_dso(const DSearchPath &path, const Filename &filename);
 
 // true indicates success
-EXPCL_DTOOL bool
+EXPCL_DTOOL_DTOOLUTIL bool
 unload_dso(void *dso_handle);
 
 // Returns the error message from the last failed load_dso() call.
 
-EXPCL_DTOOL string
+EXPCL_DTOOL_DTOOLUTIL string
 load_dso_error();
 
 // Returns a function pointer or other symbol from a loaded library.
-EXPCL_DTOOL void *
+EXPCL_DTOOL_DTOOLUTIL void *
 get_dso_symbol(void *handle, const string &name);
 
 #endif

+ 3 - 3
dtool/src/dtoolutil/pandaFileStream.h

@@ -26,7 +26,7 @@
  * simple-threading implementation (using this interface will block only the
  * current thread, rather than the entire process, on I/O waits).
  */
-class EXPCL_DTOOL IFileStream : public istream {
+class EXPCL_DTOOL_DTOOLUTIL IFileStream : public istream {
 PUBLISHED:
   INLINE IFileStream();
   INLINE explicit IFileStream(const char *filename, ios::openmode mode = ios::in);
@@ -54,7 +54,7 @@ private:
  * simple-threading implementation (using this interface will block only the
  * current thread, rather than the entire process, on I/O waits).
  */
-class EXPCL_DTOOL OFileStream : public ostream {
+class EXPCL_DTOOL_DTOOLUTIL OFileStream : public ostream {
 PUBLISHED:
   INLINE OFileStream();
   INLINE explicit OFileStream(const char *filename, ios::openmode mode = ios::out);
@@ -83,7 +83,7 @@ private:
  * will block only the current thread, rather than the entire process, on I/O
  * waits).
  */
-class EXPCL_DTOOL FileStream : public iostream {
+class EXPCL_DTOOL_DTOOLUTIL FileStream : public iostream {
 PUBLISHED:
   INLINE FileStream();
   INLINE explicit FileStream(const char *filename, ios::openmode mode = ios::in);

+ 3 - 3
dtool/src/dtoolutil/pandaFileStreamBuf.h

@@ -28,7 +28,7 @@
 /**
  * The streambuf object that implements pifstream and pofstream.
  */
-class EXPCL_DTOOL PandaFileStreamBuf : public streambuf {
+class EXPCL_DTOOL_DTOOLUTIL PandaFileStreamBuf : public streambuf {
 public:
   PandaFileStreamBuf();
   virtual ~PandaFileStreamBuf();
@@ -95,10 +95,10 @@ private:
   streampos _gpos;
 };
 
-EXPCL_DTOOL ostream &
+EXPCL_DTOOL_DTOOLUTIL ostream &
 operator << (ostream &out, PandaFileStreamBuf::NewlineMode newline_mode);
 
-EXPCL_DTOOL istream &
+EXPCL_DTOOL_DTOOLUTIL istream &
 operator >> (istream &in, PandaFileStreamBuf::NewlineMode &newline_mode);
 
 #endif  // USE_PANDAFILESTREAM

+ 1 - 1
dtool/src/dtoolutil/pandaSystem.h

@@ -23,7 +23,7 @@
  * Panda.  Application developers can use this class to query the runtime
  * version or capabilities of the current Panda environment.
  */
-class EXPCL_DTOOL PandaSystem {
+class EXPCL_DTOOL_DTOOLUTIL PandaSystem {
 protected:
   PandaSystem();
   ~PandaSystem();

+ 5 - 5
dtool/src/dtoolutil/panda_getopt_impl.h

@@ -40,8 +40,8 @@
 extern "C" {
 #endif
 
-extern EXPCL_DTOOL char *optarg;
-extern EXPCL_DTOOL int optind, opterr, optopt;
+extern EXPCL_DTOOL_DTOOLUTIL char *optarg;
+extern EXPCL_DTOOL_DTOOLUTIL int optind, opterr, optopt;
 
 struct option {
   const char *name;
@@ -54,12 +54,12 @@ struct option {
 #define required_argument 1
 #define optional_argument 2
 
-extern EXPCL_DTOOL int
+extern EXPCL_DTOOL_DTOOLUTIL int
 getopt(int argc, char *const argv[], const char *optstring);
-extern EXPCL_DTOOL int
+extern EXPCL_DTOOL_DTOOLUTIL int
 getopt_long(int argc, char *const argv[], const char *optstring,
             const struct option *longopts, int *longindex);
-extern EXPCL_DTOOL int
+extern EXPCL_DTOOL_DTOOLUTIL int
 getopt_long_only(int argc, char *const argv[], const char *optstring,
                  const struct option *longopts, int *longindex);
 

+ 2 - 2
dtool/src/dtoolutil/pfstream.h

@@ -16,7 +16,7 @@
 
 #include "pfstreamBuf.h"
 
-class EXPCL_DTOOL IPipeStream : public istream {
+class EXPCL_DTOOL_DTOOLUTIL IPipeStream : public istream {
 public:
   INLINE IPipeStream(const std::string);
 
@@ -32,7 +32,7 @@ private:
   INLINE IPipeStream();
 };
 
-class EXPCL_DTOOL OPipeStream : public ostream {
+class EXPCL_DTOOL_DTOOLUTIL OPipeStream : public ostream {
 public:
   INLINE OPipeStream(const std::string);
 

+ 1 - 1
dtool/src/dtoolutil/pfstreamBuf.h

@@ -41,7 +41,7 @@
 
 #endif // WIN_PIPE_CALLS
 
-class EXPCL_DTOOL PipeStreamBuf : public streambuf {
+class EXPCL_DTOOL_DTOOLUTIL PipeStreamBuf : public streambuf {
 public:
   enum Direction { Input, Output };
 

+ 1 - 1
dtool/src/dtoolutil/preprocess_argv.h

@@ -16,7 +16,7 @@
 
 #include "dtoolbase.h"
 
-extern EXPCL_DTOOL void
+extern EXPCL_DTOOL_DTOOLUTIL void
 preprocess_argv(int &argc, char **&argv);
 
 #endif

+ 1 - 1
dtool/src/dtoolutil/stringDecoder.h

@@ -21,7 +21,7 @@
  * byte streams.  Give it a string, then ask it to pull the characters out one
  * at a time.  This also serves as the plain old byte-at-a-time decoder.
  */
-class EXPCL_DTOOL StringDecoder {
+class EXPCL_DTOOL_DTOOLUTIL StringDecoder {
 public:
   INLINE StringDecoder(const string &input);
   virtual ~StringDecoder();

+ 20 - 20
dtool/src/dtoolutil/string_utils.h

@@ -22,44 +22,44 @@
 
 // Case-insensitive string comparison, from Stroustrup's C++ third edition.
 // Works like strcmp().
-EXPCL_DTOOL int cmp_nocase(const string &s, const string &s2);
+EXPCL_DTOOL_DTOOLUTIL int cmp_nocase(const string &s, const string &s2);
 
 // Similar, except it also accepts hyphen and underscore as equivalent.
-EXPCL_DTOOL int cmp_nocase_uh(const string &s, const string &s2);
+EXPCL_DTOOL_DTOOLUTIL int cmp_nocase_uh(const string &s, const string &s2);
 
 // Returns the string converted to lowercase.
-EXPCL_DTOOL string downcase(const string &s);
+EXPCL_DTOOL_DTOOLUTIL string downcase(const string &s);
 
 // Returns the string converted to uppercase.
-EXPCL_DTOOL string upcase(const string &s);
+EXPCL_DTOOL_DTOOLUTIL string upcase(const string &s);
 
 // Separates the string into words according to whitespace.
-EXPCL_DTOOL int extract_words(const string &str, vector_string &words);
-EXPCL_DTOOL int extract_words(const wstring &str, pvector<wstring> &words);
+EXPCL_DTOOL_DTOOLUTIL int extract_words(const string &str, vector_string &words);
+EXPCL_DTOOL_DTOOLUTIL int extract_words(const wstring &str, pvector<wstring> &words);
 
 // Separates the string into words according to the indicated delimiters.
-EXPCL_DTOOL void tokenize(const string &str, vector_string &words,
+EXPCL_DTOOL_DTOOLUTIL void tokenize(const string &str, vector_string &words,
                           const string &delimiters,
                           bool discard_repeated_delimiters = false);
-EXPCL_DTOOL void tokenize(const wstring &str, pvector<wstring> &words,
+EXPCL_DTOOL_DTOOLUTIL void tokenize(const wstring &str, pvector<wstring> &words,
                           const wstring &delimiters,
                           bool discard_repeated_delimiters = false);
 
 // Trims leading andor trailing whitespace from the string.
-EXPCL_DTOOL string trim_left(const string &str);
-EXPCL_DTOOL wstring trim_left(const wstring &str);
-EXPCL_DTOOL string trim_right(const string &str);
-EXPCL_DTOOL wstring trim_right(const wstring &str);
-EXPCL_DTOOL string trim(const string &str);
-EXPCL_DTOOL wstring trim(const wstring &str);
+EXPCL_DTOOL_DTOOLUTIL string trim_left(const string &str);
+EXPCL_DTOOL_DTOOLUTIL wstring trim_left(const wstring &str);
+EXPCL_DTOOL_DTOOLUTIL string trim_right(const string &str);
+EXPCL_DTOOL_DTOOLUTIL wstring trim_right(const wstring &str);
+EXPCL_DTOOL_DTOOLUTIL string trim(const string &str);
+EXPCL_DTOOL_DTOOLUTIL wstring trim(const wstring &str);
 
 // Functions to parse numeric values out of a string.
-EXPCL_DTOOL int string_to_int(const string &str, string &tail);
-EXPCL_DTOOL bool string_to_int(const string &str, int &result);
-EXPCL_DTOOL double string_to_double(const string &str, string &tail);
-EXPCL_DTOOL bool string_to_double(const string &str, double &result);
-EXPCL_DTOOL bool string_to_float(const string &str, float &result);
-EXPCL_DTOOL bool string_to_stdfloat(const string &str, PN_stdfloat &result);
+EXPCL_DTOOL_DTOOLUTIL int string_to_int(const string &str, string &tail);
+EXPCL_DTOOL_DTOOLUTIL bool string_to_int(const string &str, int &result);
+EXPCL_DTOOL_DTOOLUTIL double string_to_double(const string &str, string &tail);
+EXPCL_DTOOL_DTOOLUTIL bool string_to_double(const string &str, double &result);
+EXPCL_DTOOL_DTOOLUTIL bool string_to_float(const string &str, float &result);
+EXPCL_DTOOL_DTOOLUTIL bool string_to_stdfloat(const string &str, PN_stdfloat &result);
 
 // Convenience function to make a string from anything that has an ostream
 // operator.

+ 4 - 4
dtool/src/dtoolutil/textEncoder.h

@@ -30,7 +30,7 @@ class StringDecoder;
  * This class is also a base class of TextNode, which inherits this
  * functionality.
  */
-class EXPCL_DTOOL TextEncoder {
+class EXPCL_DTOOL_DTOOLUTIL TextEncoder {
 PUBLISHED:
   enum Encoding {
     E_iso8859,
@@ -112,9 +112,9 @@ private:
   static Encoding _default_encoding;
 };
 
-EXPCL_DTOOL ostream &
+EXPCL_DTOOL_DTOOLUTIL ostream &
 operator << (ostream &out, TextEncoder::Encoding encoding);
-EXPCL_DTOOL istream &
+EXPCL_DTOOL_DTOOLUTIL istream &
 operator >> (istream &in, TextEncoder::Encoding &encoding);
 
 // We'll define the output operator for wstring here, too.  Presumably this
@@ -122,7 +122,7 @@ operator >> (istream &in, TextEncoder::Encoding &encoding);
 
 // This function is declared inline to minimize the risk of link conflicts
 // should another third-party module also define the same output operator.
-INLINE EXPCL_DTOOL ostream &
+INLINE EXPCL_DTOOL_DTOOLUTIL ostream &
 operator << (ostream &out, const wstring &str);
 
 #include "textEncoder.I"

+ 1 - 1
dtool/src/dtoolutil/unicodeLatinMap.h

@@ -25,7 +25,7 @@
  * equivalent without the accent mark; as well as how to switch case from
  * upper to lower while retaining the Unicode accent marks.
  */
-class EXPCL_DTOOL UnicodeLatinMap {
+class EXPCL_DTOOL_DTOOLUTIL UnicodeLatinMap {
 public:
   enum AccentType {
     AT_none,

+ 2 - 2
dtool/src/dtoolutil/vector_double.cxx

@@ -13,8 +13,8 @@
 
 #include "vector_double.h"
 
-#define EXPCL EXPCL_DTOOL
-#define EXPTP EXPTP_DTOOL
+#define EXPCL EXPCL_DTOOL_DTOOLUTIL
+#define EXPTP EXPTP_DTOOL_DTOOLUTIL
 #define TYPE double
 #define NAME vector_double
 

+ 2 - 2
dtool/src/dtoolutil/vector_double.h

@@ -23,8 +23,8 @@
  * defining the vector again.
  */
 
-#define EXPCL EXPCL_DTOOL
-#define EXPTP EXPTP_DTOOL
+#define EXPCL EXPCL_DTOOL_DTOOLUTIL
+#define EXPTP EXPTP_DTOOL_DTOOLUTIL
 #define TYPE double
 #define NAME vector_double
 

+ 2 - 2
dtool/src/dtoolutil/vector_float.cxx

@@ -13,8 +13,8 @@
 
 #include "vector_float.h"
 
-#define EXPCL EXPCL_DTOOL
-#define EXPTP EXPTP_DTOOL
+#define EXPCL EXPCL_DTOOL_DTOOLUTIL
+#define EXPTP EXPTP_DTOOL_DTOOLUTIL
 #define TYPE float
 #define NAME vector_float
 

+ 2 - 2
dtool/src/dtoolutil/vector_float.h

@@ -23,8 +23,8 @@
  * defining the vector again.
  */
 
-#define EXPCL EXPCL_DTOOL
-#define EXPTP EXPTP_DTOOL
+#define EXPCL EXPCL_DTOOL_DTOOLUTIL
+#define EXPTP EXPTP_DTOOL_DTOOLUTIL
 #define TYPE float
 #define NAME vector_float
 

+ 2 - 2
dtool/src/dtoolutil/vector_int.cxx

@@ -13,8 +13,8 @@
 
 #include "vector_int.h"
 
-#define EXPCL EXPCL_DTOOL
-#define EXPTP EXPTP_DTOOL
+#define EXPCL EXPCL_DTOOL_DTOOLUTIL
+#define EXPTP EXPTP_DTOOL_DTOOLUTIL
 #define TYPE int
 #define NAME vector_int
 

+ 2 - 2
dtool/src/dtoolutil/vector_int.h

@@ -23,8 +23,8 @@
  * rather than defining the vector again.
  */
 
-#define EXPCL EXPCL_DTOOL
-#define EXPTP EXPTP_DTOOL
+#define EXPCL EXPCL_DTOOL_DTOOLUTIL
+#define EXPTP EXPTP_DTOOL_DTOOLUTIL
 #define TYPE int
 #define NAME vector_int
 

+ 2 - 2
dtool/src/dtoolutil/vector_string.cxx

@@ -13,8 +13,8 @@
 
 #include "vector_string.h"
 
-#define EXPCL EXPCL_DTOOL
-#define EXPTP EXPTP_DTOOL
+#define EXPCL EXPCL_DTOOL_DTOOLUTIL
+#define EXPTP EXPTP_DTOOL_DTOOLUTIL
 #define TYPE std::string
 #define NAME vector_string
 

+ 2 - 2
dtool/src/dtoolutil/vector_string.h

@@ -23,8 +23,8 @@
  * defining the vector again.
  */
 
-#define EXPCL EXPCL_DTOOL
-#define EXPTP EXPTP_DTOOL
+#define EXPCL EXPCL_DTOOL_DTOOLUTIL
+#define EXPTP EXPTP_DTOOL_DTOOLUTIL
 #define TYPE std::string
 #define NAME vector_string
 

+ 2 - 2
dtool/src/dtoolutil/vector_uchar.cxx

@@ -13,8 +13,8 @@
 
 #include "vector_uchar.h"
 
-#define EXPCL EXPCL_DTOOL
-#define EXPTP EXPTP_DTOOL
+#define EXPCL EXPCL_DTOOL_DTOOLUTIL
+#define EXPTP EXPTP_DTOOL_DTOOLUTIL
 #define TYPE unsigned char
 #define NAME vector_uchar
 

+ 2 - 2
dtool/src/dtoolutil/vector_uchar.h

@@ -23,8 +23,8 @@
  * rather than defining the vector again.
  */
 
-#define EXPCL EXPCL_DTOOL
-#define EXPTP EXPTP_DTOOL
+#define EXPCL EXPCL_DTOOL_DTOOLUTIL
+#define EXPTP EXPTP_DTOOL_DTOOLUTIL
 #define TYPE unsigned char
 #define NAME vector_uchar
 

+ 1 - 1
dtool/src/dtoolutil/win32ArgParser.h

@@ -30,7 +30,7 @@
  * but it is also supports automatic expansion of glob filenames, e.g.  *.egg
  * is turned into an explicit list of egg files in the directory.
  */
-class EXPCL_DTOOL Win32ArgParser {
+class EXPCL_DTOOL_DTOOLUTIL Win32ArgParser {
 public:
   Win32ArgParser();
   ~Win32ArgParser();

+ 2 - 2
makepanda/makepanda.py

@@ -2596,12 +2596,12 @@ PANDAVERSION_H_RUNTIME="""
 
 CHECKPANDAVERSION_CXX="""
 # include "dtoolbase.h"
-EXPCL_DTOOL int panda_version_$VERSION1_$VERSION2 = 0;
+EXPCL_DTOOL_DTOOLUTIL int panda_version_$VERSION1_$VERSION2 = 0;
 """
 
 CHECKPANDAVERSION_H="""
 # include "dtoolbase.h"
-extern EXPCL_DTOOL int panda_version_$VERSION1_$VERSION2;
+extern EXPCL_DTOOL_DTOOLUTIL int panda_version_$VERSION1_$VERSION2;
 # ifndef WIN32
 /* For Windows, exporting the symbol from the DLL is sufficient; the
       DLL will not load unless all expected public symbols are defined.