# HG changeset patch # User Markus Mützel # Date 1609256036 -3600 # Node ID cc4a4df4e32f8f986eca2ff2748ef12fdff4f5fa # Parent 5aa7874525442a516992b98c9c716d5354f3e47d Add API tag for Array class that is exported from liboctave and liboctinterp (patch #8919). * oct-conf-post.in.h: Add new tag for Array functions that are used in the API of liboctave and liboctinterp. * build-aux/mk-octave-config-h.sh: Define API tags. * liboctave/array/Array.h: Add OCTARRAY_API to exported/imported functions. diff -r 5aa787452544 -r cc4a4df4e32f build-aux/mk-octave-config-h.sh --- a/build-aux/mk-octave-config-h.sh Wed Dec 16 01:05:17 2020 -0500 +++ b/build-aux/mk-octave-config-h.sh Tue Dec 29 16:33:56 2020 +0100 @@ -191,8 +191,40 @@ # define OCTAVE_IMPORT # endif +/* API macro for liboctave */ +#if defined (OCTAVE_DLL) +# define OCTAVE_API OCTAVE_EXPORT +#else # define OCTAVE_API OCTAVE_IMPORT +#endif + +/* API macro for libinterp */ +#if defined (OCTINTERP_DLL) +# define OCTINTERP_API OCTAVE_EXPORT +#else # define OCTINTERP_API OCTAVE_IMPORT +#endif + +/* API macro for the Array class in liboctave and liboctinterp */ +#if (defined (OCTAVE_DLL) || defined (OCTINTERP_DLL)) +# define OCTARRAY_API OCTAVE_EXPORT +#else +# define OCTARRAY_API OCTAVE_IMPORT +#endif + +/* API macro for libinterp/graphics */ +#if defined (OCTGRAPHICS_DLL) +# define OCTGRAPHICS_API OCTAVE_EXPORT +#else +# define OCTGRAPHICS_API OCTAVE_IMPORT +#endif + +/* API macro for libgui */ +#if defined (OCTGUI_DLL) +# define OCTGUI_API OCTAVE_EXPORT +#else +# define OCTGUI_API OCTAVE_IMPORT +#endif EOF octave_idx_type="`$SED -n 's/#define OCTAVE_IDX_TYPE \([_a-zA-Z][_a-zA-Z0-9]*\)/\1/p' $config_h_file`" diff -r 5aa787452544 -r cc4a4df4e32f liboctave/array/Array.h --- a/liboctave/array/Array.h Wed Dec 16 01:05:17 2020 -0500 +++ b/liboctave/array/Array.h Tue Dec 29 16:33:56 2020 +0100 @@ -178,7 +178,7 @@ // No assignment! - ArrayRep& operator = (const ArrayRep& a); + OCTARRAY_API ArrayRep& operator = (const ArrayRep& a); }; //-------------------------------------------------------------------- @@ -239,7 +239,7 @@ private: - static typename Array::ArrayRep *nil_rep (void); + static OCTARRAY_API typename Array::ArrayRep *nil_rep (void); protected: @@ -279,7 +279,7 @@ } //! Reshape constructor. - Array (const Array& a, const dim_vector& dv); + OCTARRAY_API Array (const Array& a, const dim_vector& dv); //! Constructor from standard library sequence containers. template