# HG changeset patch
# User Markus Mützel <markus.muetzel@gmx.de>
# Date 1638728341 -3600
#      Sun Dec 05 19:19:01 2021 +0100
# Branch stable
# Node ID 2edacfddbc56228d773405f5d3df08b25230d3f0
# Parent  e3df47a198712a6b60127901c733ed1db6325c33
cdef-* classes: Forward declare with visibility flags (bug #59820).

diff -r e3df47a19871 -r 2edacfddbc56 libinterp/octave-value/cdef-class.h
--- a/libinterp/octave-value/cdef-class.h	Sun Dec 05 14:58:44 2021 +0100
+++ b/libinterp/octave-value/cdef-class.h	Sun Dec 05 19:19:01 2021 +0100
@@ -47,7 +47,9 @@
   class interpreter;
   class tree_classdef;
 
+#define octave_cdef_class_fwd_decl
   class
+  OCTINTERP_API
   cdef_class : public cdef_meta_object
   {
   private:
diff -r e3df47a19871 -r 2edacfddbc56 libinterp/octave-value/cdef-manager.h
--- a/libinterp/octave-value/cdef-manager.h	Sun Dec 05 14:58:44 2021 +0100
+++ b/libinterp/octave-value/cdef-manager.h	Sun Dec 05 19:19:01 2021 +0100
@@ -36,9 +36,9 @@
 
 namespace octave
 {
-  class interpreter;
+  class OCTINTERP_API interpreter;
 
-  class cdef_manager
+  class OCTINTERP_API cdef_manager
   {
   public:
 
diff -r e3df47a19871 -r 2edacfddbc56 libinterp/octave-value/cdef-method.h
--- a/libinterp/octave-value/cdef-method.h	Sun Dec 05 14:58:44 2021 +0100
+++ b/libinterp/octave-value/cdef-method.h	Sun Dec 05 19:19:01 2021 +0100
@@ -40,6 +40,7 @@
 namespace octave
 {
   class
+  OCTINTERP_API
   cdef_method : public cdef_meta_object
   {
     friend class cdef_class;
diff -r e3df47a19871 -r 2edacfddbc56 libinterp/octave-value/cdef-object.h
--- a/libinterp/octave-value/cdef-object.h	Sun Dec 05 14:58:44 2021 +0100
+++ b/libinterp/octave-value/cdef-object.h	Sun Dec 05 19:19:01 2021 +0100
@@ -40,8 +40,11 @@
 
 namespace octave
 {
-  class cdef_object;
-  class cdef_class;
+  class OCTINTERP_API cdef_object;
+#if ! defined (octave_cdef_class_fwd_decl)
+#  define octave_cdef_class_fwd_decl
+  class OCTINTERP_API cdef_class;
+#endif
 
   // This is mainly a bootstrap class to declare the expected interface.
   // The actual base class is cdef_class_base, which is declared after
@@ -201,6 +204,7 @@
   };
 
   class
+  OCTINTERP_API
   cdef_object
   {
   public:
@@ -387,6 +391,7 @@
   };
 
   class
+  OCTINTERP_API
   cdef_object_array : public cdef_object_base
   {
   public:
@@ -454,6 +459,7 @@
   };
 
   class
+  OCTINTERP_API
   cdef_object_scalar : public cdef_object_base
   {
   public:
@@ -575,6 +581,7 @@
   };
 
   class
+  OCTINTERP_API
   value_cdef_object : public cdef_object_scalar
   {
   public:
@@ -605,6 +612,7 @@
   };
 
   class
+  OCTINTERP_API
   cdef_meta_object_rep : public handle_cdef_object
   {
   public:
@@ -652,6 +660,7 @@
   };
 
   class
+  OCTINTERP_API
   cdef_meta_object : public cdef_object
   {
   public:
diff -r e3df47a19871 -r 2edacfddbc56 libinterp/octave-value/cdef-package.h
--- a/libinterp/octave-value/cdef-package.h	Sun Dec 05 14:58:44 2021 +0100
+++ b/libinterp/octave-value/cdef-package.h	Sun Dec 05 19:19:01 2021 +0100
@@ -41,7 +41,9 @@
 {
   class interpreter;
 
+#define octave_cdef_package_fwd_decl
   class
+  OCTINTERP_API
   cdef_package : public cdef_meta_object
   {
     friend class cdef_class;
diff -r e3df47a19871 -r 2edacfddbc56 libinterp/octave-value/cdef-property.h
--- a/libinterp/octave-value/cdef-property.h	Sun Dec 05 14:58:44 2021 +0100
+++ b/libinterp/octave-value/cdef-property.h	Sun Dec 05 19:19:01 2021 +0100
@@ -41,6 +41,7 @@
 namespace octave
 {
   class
+  OCTINTERP_API
   cdef_property : public cdef_meta_object
   {
     friend class cdef_class;
diff -r e3df47a19871 -r 2edacfddbc56 libinterp/octave-value/cdef-utils.h
--- a/libinterp/octave-value/cdef-utils.h	Sun Dec 05 14:58:44 2021 +0100
+++ b/libinterp/octave-value/cdef-utils.h	Sun Dec 05 19:19:01 2021 +0100
@@ -36,8 +36,14 @@
 
 namespace octave
 {
-  class cdef_class;
-  class cdef_package;
+#if ! defined (octave_cdef_class_fwd_decl)
+#  define octave_cdef_class_fwd_decl
+  class OCTINTERP_API cdef_class;
+#endif
+#if ! defined (octave_cdef_package_fwd_decl)
+#  define octave_cdef_package_fwd_decl
+  class OCTINTERP_API cdef_package;
+#endif
 
   extern OCTINTERP_API std::string
   get_base_name (const std::string& nm);
