summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanc999@yahoo.com.tw>2021-05-14 18:47:09 +0000
committerChun-wei Fan <fanc999@yahoo.com.tw>2021-05-14 18:47:09 +0000
commit19f08ffaf2c7245c240013be36b2f44f87582d6f (patch)
treeeefd50064613c590a9950a5c845f832f0c7dceef
parent9685f6fc8962efc1534c3a5ba5b4e477631ad3f1 (diff)
parenteabcc013a3d6f9863c01a51142514423b4aa8c04 (diff)
downloadglibmm-19f08ffaf2c7245c240013be36b2f44f87582d6f.tar.gz
Merge branch 'std-string-msvc-fixes' into 'master'
Export classes selectively (fix issue #90) Closes #90 See merge request GNOME/glibmm!51
-rw-r--r--MSVC_NMake/config-msvc.mak3
-rw-r--r--gio/giomm/socketsource.h14
-rw-r--r--gio/src/fileattributeinfo.hg20
-rw-r--r--gio/src/socket.hg2
-rw-r--r--glib/glibmm/error.h38
-rw-r--r--glib/glibmm/main.h128
-rw-r--r--glib/glibmm/ustring.h330
-rw-r--r--glib/glibmm/variantdbusstring.h4
-rw-r--r--meson.build2
-rw-r--r--tools/m4/gerror.m410
10 files changed, 275 insertions, 276 deletions
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
index d30d1770..961f482b 100644
--- a/MSVC_NMake/config-msvc.mak
+++ b/MSVC_NMake/config-msvc.mak
@@ -25,8 +25,7 @@ M4 = m4
GLIBMM_BASE_CFLAGS = \
/Ivs$(VSVER)\$(CFG)\$(PLAT) \
/I..\untracked\glib /I..\untracked\glib\glibmm \
- /I..\glib /I..\glib\glibmm /I.\glibmm \
- /wd4530 /wd4251 /wd4275 /std:c++17 \
+ /I..\glib /I..\glib\glibmm /I.\glibmm /EHsc /std:c++17 \
/FImsvc_recommended_pragmas.h
GIOMM_BASE_CFLAGS = \
diff --git a/gio/giomm/socketsource.h b/gio/giomm/socketsource.h
index f626a88b..477e0e3d 100644
--- a/gio/giomm/socketsource.h
+++ b/gio/giomm/socketsource.h
@@ -102,31 +102,31 @@ SignalSocket signal_socket(
* @newin{2,42}
* @ingroup NetworkIO
*/
-class GIOMM_API SocketSource : public Glib::IOSource
+class SocketSource : public Glib::IOSource
{
public:
using CppObjectType = Gio::SocketSource;
- static Glib::RefPtr<SocketSource> create(const Glib::RefPtr<Socket>& socket,
+ GIOMM_API static Glib::RefPtr<SocketSource> create(const Glib::RefPtr<Socket>& socket,
Glib::IOCondition condition,
const Glib::RefPtr<Cancellable>& cancellable = {});
protected:
- SocketSource(const Glib::RefPtr<Socket>& socket, Glib::IOCondition condition,
+ GIOMM_API SocketSource(const Glib::RefPtr<Socket>& socket, Glib::IOCondition condition,
const Glib::RefPtr<Cancellable>& cancellable);
- ~SocketSource() noexcept override;
+ GIOMM_API ~SocketSource() noexcept override;
private:
- friend Socket;
+ friend GIOMM_API Socket;
// This is just to avoid the need for Gio::Socket to create a RefPtr<> to itself.
- static Glib::RefPtr<SocketSource> create(GSocket* socket,
+ GIOMM_API static Glib::RefPtr<SocketSource> create(GSocket* socket,
Glib::IOCondition condition,
const Glib::RefPtr<Cancellable>& cancellable = {});
// This is just to avoid the need for Gio::Socket to create a RefPtr<> to itself.
- SocketSource(GSocket* socket, Glib::IOCondition condition,
+ GIOMM_API SocketSource(GSocket* socket, Glib::IOCondition condition,
const Glib::RefPtr<Cancellable>& cancellable);
};
diff --git a/gio/src/fileattributeinfo.hg b/gio/src/fileattributeinfo.hg
index 5447efd3..377206e2 100644
--- a/gio/src/fileattributeinfo.hg
+++ b/gio/src/fileattributeinfo.hg
@@ -33,25 +33,25 @@ _WRAP_ENUM(FileAttributeStatus, GFileAttributeStatus, decl_prefix GIOMM_API)
*
* @newin{2,16}
*/
-class GIOMM_API FileAttributeInfo
+class FileAttributeInfo
{
_CLASS_GENERIC(FileAttributeInfo, GFileAttributeInfo, decl_prefix GIOMM_API)
public:
_WRAP_ENUM(Flags, GFileAttributeInfoFlags)
- explicit FileAttributeInfo(const GFileAttributeInfo* ginfo);
+ GIOMM_API explicit FileAttributeInfo(const GFileAttributeInfo* ginfo);
- FileAttributeInfo(const FileAttributeInfo& other);
- FileAttributeInfo& operator=(const FileAttributeInfo& other);
+ GIOMM_API FileAttributeInfo(const FileAttributeInfo& other);
+ GIOMM_API FileAttributeInfo& operator=(const FileAttributeInfo& other);
- FileAttributeInfo(FileAttributeInfo&& other) noexcept;
- FileAttributeInfo& operator=(FileAttributeInfo&& other) noexcept;
+ GIOMM_API FileAttributeInfo(FileAttributeInfo&& other) noexcept;
+ GIOMM_API FileAttributeInfo& operator=(FileAttributeInfo&& other) noexcept;
- ~FileAttributeInfo();
+ GIOMM_API ~FileAttributeInfo();
- std::string get_name() const;
- FileAttributeType get_type() const;
- Flags get_flags() const;
+ GIOMM_API std::string get_name() const;
+ GIOMM_API FileAttributeType get_type() const;
+ GIOMM_API Flags get_flags() const;
protected:
std::string m_name;
diff --git a/gio/src/socket.hg b/gio/src/socket.hg
index c790bb54..bb6bcdc0 100644
--- a/gio/src/socket.hg
+++ b/gio/src/socket.hg
@@ -28,7 +28,7 @@ _PINCLUDE(glibmm/private/object_p.h)
namespace Gio
{
-class GIOMM_API SocketSource;
+class SocketSource;
/** @defgroup NetworkIO Portable Network I/O Functionality
diff --git a/glib/glibmm/error.h b/glib/glibmm/error.h
index 19e37416..13bbb683 100644
--- a/glib/glibmm/error.h
+++ b/glib/glibmm/error.h
@@ -25,44 +25,44 @@
namespace Glib
{
-class GLIBMM_API Error : public std::exception
+class Error : public std::exception
{
public:
- Error();
- Error(GQuark error_domain, int error_code, const Glib::ustring& message);
- explicit Error(GError* gobject, bool take_copy = false);
+ GLIBMM_API Error();
+ GLIBMM_API Error(GQuark error_domain, int error_code, const Glib::ustring& message);
+ GLIBMM_API explicit Error(GError* gobject, bool take_copy = false);
- Error(const Error& other);
- Error& operator=(const Error& other);
+ GLIBMM_API Error(const Error& other);
+ GLIBMM_API Error& operator=(const Error& other);
- ~Error() noexcept override;
+ GLIBMM_API ~Error() noexcept override;
/** Test whether the %Error has an underlying instance.
*
* @newin{2,60}
*/
- explicit operator bool() const;
+ GLIBMM_API explicit operator bool() const;
- GQuark domain() const;
- int code() const;
- const char* what() const noexcept override;
+ GLIBMM_API GQuark domain() const;
+ GLIBMM_API int code() const;
+ GLIBMM_API const char* what() const noexcept override;
- bool matches(GQuark error_domain, int error_code) const;
+ GLIBMM_API bool matches(GQuark error_domain, int error_code) const;
- GError* gobj();
- const GError* gobj() const;
+ GLIBMM_API GError* gobj();
+ GLIBMM_API const GError* gobj() const;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- void propagate(GError** dest);
+ GLIBMM_API void propagate(GError** dest);
using ThrowFunc = void(*)(GError*);
- static void register_init();
- static void register_cleanup();
- static void register_domain(GQuark error_domain, ThrowFunc throw_func);
+ GLIBMM_API static void register_init();
+ GLIBMM_API static void register_cleanup();
+ GLIBMM_API static void register_domain(GQuark error_domain, ThrowFunc throw_func);
- static void throw_exception(GError* gobject) G_GNUC_NORETURN;
+ GLIBMM_API static void throw_exception(GError* gobject) G_GNUC_NORETURN;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
diff --git a/glib/glibmm/main.h b/glib/glibmm/main.h
index d468552e..4dda91b6 100644
--- a/glib/glibmm/main.h
+++ b/glib/glibmm/main.h
@@ -701,7 +701,7 @@ private:
GLIBMM_API
Glib::RefPtr<MainLoop> wrap(GMainLoop* gobject, bool take_copy = false);
-class GLIBMM_API Source
+class Source
{
public:
using CppObjectType = Glib::Source;
@@ -711,19 +711,19 @@ public:
Source(const Source&) = delete;
Source& operator=(const Source&) = delete;
- static Glib::RefPtr<Source> create() /* = 0 */;
+ GLIBMM_API static Glib::RefPtr<Source> create() /* = 0 */;
/** Adds a Source to a context so that it will be executed within that context.
* @param context A MainContext.
* @return The ID for the source within the MainContext.
*/
- unsigned int attach(const Glib::RefPtr<MainContext>& context);
+ GLIBMM_API unsigned int attach(const Glib::RefPtr<MainContext>& context);
/** Adds a Source to a context so that it will be executed within that context.
* The default context will be used.
* @return The ID for the source within the MainContext.
*/
- unsigned int attach();
+ GLIBMM_API unsigned int attach();
// TODO: Does this destroy step make sense in C++? Should it just be something that happens in a
// destructor?
@@ -731,19 +731,19 @@ public:
/** Removes a source from its MainContext, if any, and marks it as destroyed.
* The source cannot be subsequently added to another context.
*/
- void destroy();
+ GLIBMM_API void destroy();
/** Sets the priority of a source. While the main loop is being run, a source will be dispatched
* if it is ready to be dispatched and no sources at a higher (numerically smaller) priority are
* ready to be dispatched.
* @param priority The new priority.
*/
- void set_priority(int priority);
+ GLIBMM_API void set_priority(int priority);
/** Gets the priority of a source.
* @return The priority of the source.
*/
- int get_priority() const;
+ GLIBMM_API int get_priority() const;
/** Sets whether a source can be called recursively.
* If @a can_recurse is true, then while the source is being dispatched then this source will be
@@ -751,19 +751,19 @@ public:
* function returns.
* @param can_recurse Whether recursion is allowed for this source.
*/
- void set_can_recurse(bool can_recurse);
+ GLIBMM_API void set_can_recurse(bool can_recurse);
/** Checks whether a source is allowed to be called recursively. see set_can_recurse().
* @return Whether recursion is allowed.
*/
- bool get_can_recurse() const;
+ GLIBMM_API bool get_can_recurse() const;
/** Returns the numeric ID for a particular source.
* The ID of a source is unique within a particular main loop context. The reverse mapping from ID
* to source is done by MainContext::find_source_by_id().
* @return The ID for the source.
*/
- unsigned int get_id() const;
+ GLIBMM_API unsigned int get_id() const;
// TODO: Add a const version of this method?
/** Gets the MainContext with which the source is associated.
@@ -771,19 +771,19 @@ public:
* @return The MainContext with which the source is associated, or a null RefPtr if the context
* has not yet been added to a source.
*/
- Glib::RefPtr<MainContext> get_context();
+ GLIBMM_API Glib::RefPtr<MainContext> get_context();
- GSource* gobj() { return gobject_; }
- const GSource* gobj() const { return gobject_; }
- GSource* gobj_copy() const;
+ GLIBMM_API GSource* gobj() { return gobject_; }
+ GLIBMM_API const GSource* gobj() const { return gobject_; }
+ GLIBMM_API GSource* gobj_copy() const;
- void reference() const;
- void unreference() const;
+ GLIBMM_API void reference() const;
+ GLIBMM_API void unreference() const;
protected:
/** Construct an object that uses the virtual functions prepare(), check() and dispatch().
*/
- Source();
+ GLIBMM_API Source();
/** Wrap an existing GSource object and install the given callback function.
* The constructed object doesn't use the virtual functions prepare(), check() and dispatch().
@@ -792,23 +792,23 @@ protected:
* depending on the actual implementation of the GSource's virtual functions
* the expected type of the callback function can differ from GSourceFunc.
*/
- Source(GSource* cast_item, GSourceFunc callback_func);
+ GLIBMM_API Source(GSource* cast_item, GSourceFunc callback_func);
- virtual ~Source() noexcept;
+ GLIBMM_API virtual ~Source() noexcept;
- sigc::connection connect_generic(const sigc::slot_base& slot);
+ GLIBMM_API sigc::connection connect_generic(const sigc::slot_base& slot);
/** Adds a file descriptor to the set of file descriptors polled for this source.
* The event source's check function will typically test the revents field in the PollFD and
* return true if events need to be processed.
* @param poll_fd A PollFD object holding information about a file descriptor to watch.
*/
- void add_poll(PollFD& poll_fd);
+ GLIBMM_API void add_poll(PollFD& poll_fd);
/** Removes a file descriptor from the set of file descriptors polled for this source.
* @param poll_fd A PollFD object previously passed to add_poll().
*/
- void remove_poll(PollFD& poll_fd);
+ GLIBMM_API void remove_poll(PollFD& poll_fd);
// TODO: Remove mention of g_get_monotonic time when we wrap it in C++.
/** Gets the time to be used when checking this source. The advantage of
@@ -823,11 +823,11 @@ protected:
*
* @newin{2,28}
*/
- gint64 get_time() const;
+ GLIBMM_API gint64 get_time() const;
- virtual bool prepare(int& timeout) = 0;
- virtual bool check() = 0;
- virtual bool dispatch(sigc::slot_base* slot) = 0;
+ GLIBMM_API virtual bool prepare(int& timeout) = 0;
+ GLIBMM_API virtual bool check() = 0;
+ GLIBMM_API virtual bool dispatch(sigc::slot_base* slot) = 0;
private:
GSource* gobject_;
@@ -840,100 +840,100 @@ private:
std::atomic_int keep_wrapper_ {2};
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- static inline Source* get_wrapper(GSource* source);
+ GLIBMM_API static inline Source* get_wrapper(GSource* source);
static const GSourceFuncs vfunc_table_;
- static gboolean prepare_vfunc(GSource* source, int* timeout);
- static gboolean check_vfunc(GSource* source);
- static gboolean dispatch_vfunc(GSource* source, GSourceFunc callback, void* user_data);
+ GLIBMM_API static gboolean prepare_vfunc(GSource* source, int* timeout);
+ GLIBMM_API static gboolean check_vfunc(GSource* source);
+ GLIBMM_API static gboolean dispatch_vfunc(GSource* source, GSourceFunc callback, void* user_data);
public:
// Really destroys the object during the second call. See keep_wrapper_.
- static void destroy_notify_callback2(void* data);
+ GLIBMM_API static void destroy_notify_callback2(void* data);
// Used by SignalXyz, possibly in other files.
- static sigc::connection attach_signal_source(const sigc::slot_base& slot, int priority,
+ GLIBMM_API static sigc::connection attach_signal_source(const sigc::slot_base& slot, int priority,
GSource* source, GMainContext* context, GSourceFunc callback_func);
// Used by SignalXyz in other files.
- static sigc::slot_base* get_slot_from_connection_node(void* data);
+ GLIBMM_API static sigc::slot_base* get_slot_from_connection_node(void* data);
// Used by derived Source classes in other files.
- static sigc::slot_base* get_slot_from_callback_data(void* data);
+ GLIBMM_API static sigc::slot_base* get_slot_from_callback_data(void* data);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
};
-class GLIBMM_API TimeoutSource : public Glib::Source
+class TimeoutSource : public Glib::Source
{
public:
using CppObjectType = Glib::TimeoutSource;
- static Glib::RefPtr<TimeoutSource> create(unsigned int interval);
- sigc::connection connect(const sigc::slot<bool()>& slot);
+ GLIBMM_API static Glib::RefPtr<TimeoutSource> create(unsigned int interval);
+ GLIBMM_API sigc::connection connect(const sigc::slot<bool()>& slot);
protected:
- explicit TimeoutSource(unsigned int interval);
- ~TimeoutSource() noexcept override;
+ GLIBMM_API explicit TimeoutSource(unsigned int interval);
+ GLIBMM_API ~TimeoutSource() noexcept override;
- bool prepare(int& timeout) override;
- bool check() override;
- bool dispatch(sigc::slot_base* slot) override;
+ GLIBMM_API bool prepare(int& timeout) override;
+ GLIBMM_API bool check() override;
+ GLIBMM_API bool dispatch(sigc::slot_base* slot) override;
private:
gint64 expiration_; // microseconds
unsigned int interval_; // milliseconds
};
-class GLIBMM_API IdleSource : public Glib::Source
+class IdleSource : public Glib::Source
{
public:
using CppObjectType = Glib::IdleSource;
- static Glib::RefPtr<IdleSource> create();
- sigc::connection connect(const sigc::slot<bool()>& slot);
+ GLIBMM_API static Glib::RefPtr<IdleSource> create();
+ GLIBMM_API sigc::connection connect(const sigc::slot<bool()>& slot);
protected:
- IdleSource();
- ~IdleSource() noexcept override;
+ GLIBMM_API IdleSource();
+ GLIBMM_API ~IdleSource() noexcept override;
- bool prepare(int& timeout) override;
- bool check() override;
- bool dispatch(sigc::slot_base* slot_data) override;
+ GLIBMM_API bool prepare(int& timeout) override;
+ GLIBMM_API bool check() override;
+ GLIBMM_API bool dispatch(sigc::slot_base* slot_data) override;
};
-class GLIBMM_API IOSource : public Glib::Source
+class IOSource : public Glib::Source
{
public:
using CppObjectType = Glib::IOSource;
- static Glib::RefPtr<IOSource> create(PollFD::fd_t fd, IOCondition condition);
- static Glib::RefPtr<IOSource> create(
+ GLIBMM_API static Glib::RefPtr<IOSource> create(PollFD::fd_t fd, IOCondition condition);
+ GLIBMM_API static Glib::RefPtr<IOSource> create(
const Glib::RefPtr<IOChannel>& channel, IOCondition condition);
- sigc::connection connect(const sigc::slot<bool(IOCondition)>& slot);
+ GLIBMM_API sigc::connection connect(const sigc::slot<bool(IOCondition)>& slot);
protected:
- IOSource(PollFD::fd_t fd, IOCondition condition);
- IOSource(const Glib::RefPtr<IOChannel>& channel, IOCondition condition);
+ GLIBMM_API IOSource(PollFD::fd_t fd, IOCondition condition);
+ GLIBMM_API IOSource(const Glib::RefPtr<IOChannel>& channel, IOCondition condition);
/** Wrap an existing GSource object and install the given callback function.
* This constructor is for use by derived types that need to wrap a GSource object.
* @see Source::Source(GSource*, GSourceFunc).
* @newin{2,42}
*/
- IOSource(GSource* cast_item, GSourceFunc callback_func);
+ GLIBMM_API IOSource(GSource* cast_item, GSourceFunc callback_func);
- ~IOSource() noexcept override;
+ GLIBMM_API ~IOSource() noexcept override;
- bool prepare(int& timeout) override;
- bool check() override;
- bool dispatch(sigc::slot_base* slot) override;
+ GLIBMM_API bool prepare(int& timeout) override;
+ GLIBMM_API bool check() override;
+ GLIBMM_API bool dispatch(sigc::slot_base* slot) override;
private:
- friend IOChannel;
+ friend GLIBMM_API IOChannel;
// This is just to avoid the need for Gio::Socket to create a RefPtr<> to itself.
- static Glib::RefPtr<IOSource> create(GIOChannel* channel, IOCondition condition);
+ GLIBMM_API static Glib::RefPtr<IOSource> create(GIOChannel* channel, IOCondition condition);
// This is just to avoid the need for Gio::Socket to create a RefPtr<> to itself.
- IOSource(GIOChannel* channel, IOCondition condition);
+ GLIBMM_API IOSource(GIOChannel* channel, IOCondition condition);
PollFD poll_fd_;
};
diff --git a/glib/glibmm/ustring.h b/glib/glibmm/ustring.h
index 15a63e61..c295fd0b 100644
--- a/glib/glibmm/ustring.h
+++ b/glib/glibmm/ustring.h
@@ -37,7 +37,7 @@ const std::basic_string<char>::size_type std::basic_string<char>::npos = (std::b
namespace Glib
{
-class GLIBMM_API ustring;
+class ustring;
//********** Glib::StdStringView and Glib::UStringView *************
@@ -317,7 +317,7 @@ gunichar get_unichar_from_std_iterator(std::string::const_iterator pos) G_GNUC_P
* reimplement the interface so that all operations are based on characters
* instead of bytes.
*/
-class GLIBMM_API ustring
+class ustring
{
public:
using size_type = std::string::size_type;
@@ -348,83 +348,83 @@ public:
#endif /* GLIBMM_HAVE_SUN_REVERSE_ITERATOR */
#ifdef GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS
- static const size_type npos = std::string::npos;
+ GLIBMM_API static const size_type npos = std::string::npos;
#else
// The IRIX MipsPro compiler says "The indicated constant value is not known",
// so we need to initalize the static member data elsewhere.
- static const size_type npos;
+ GLIBMM_API static const size_type npos;
#endif
/*! Default constructor, which creates an empty string.
*/
- ustring();
+ GLIBMM_API ustring();
- ~ustring() noexcept;
+ GLIBMM_API ~ustring() noexcept;
/*! Construct a ustring as a copy of another ustring.
* @param other A source string.
*/
- ustring(const ustring& other);
+ GLIBMM_API ustring(const ustring& other);
/*! Construct a ustring by moving from another ustring.
* @param other A source string.
*/
- ustring(ustring&& other);
+ GLIBMM_API ustring(ustring&& other);
/*! Assign the value of another string by copying to this string.
* @param other A source string.
*/
- ustring& operator=(const ustring& other);
+ GLIBMM_API ustring& operator=(const ustring& other);
/*! Assign the value of another string by moving to this string.
* @param other A source string.
*/
- ustring& operator=(ustring&& other);
+ GLIBMM_API ustring& operator=(ustring&& other);
/*! Swap contents with another string.
* @param other String to swap with.
*/
- void swap(ustring& other);
+ GLIBMM_API void swap(ustring& other);
/*! Construct a ustring as a copy of a std::string.
* @param src A source <tt>std::string</tt> containing text encoded as UTF-8.
*/
- ustring(const std::string& src);
+ GLIBMM_API ustring(const std::string& src);
/*! Construct a ustring by moving from a std::string.
* @param src A source <tt>std::string</tt> containing text encoded as UTF-8.
*/
- ustring(std::string&& src);
+ GLIBMM_API ustring(std::string&& src);
/*! Construct a ustring as a copy of a substring.
* @param src %Source ustring.
* @param i Index of first character to copy from.
* @param n Number of UTF-8 characters to copy (defaults to copying the remainder).
*/
- ustring(const ustring& src, size_type i, size_type n = npos);
+ GLIBMM_API ustring(const ustring& src, size_type i, size_type n = npos);
/*! Construct a ustring as a partial copy of a C string.
* @param src %Source C string encoded as UTF-8.
* @param n Number of UTF-8 characters to copy.
*/
- ustring(const char* src, size_type n);
+ GLIBMM_API ustring(const char* src, size_type n);
/*! Construct a ustring as a copy of a C string.
* @param src %Source C string encoded as UTF-8.
*/
- ustring(const char* src);
+ GLIBMM_API ustring(const char* src);
/*! Construct a ustring as multiple characters.
* @param n Number of characters.
* @param uc UCS-4 code point to use.
*/
- ustring(size_type n, gunichar uc);
+ GLIBMM_API ustring(size_type n, gunichar uc);
/*! Construct a ustring as multiple characters.
* @param n Number of characters.
* @param c ASCII character to use.
*/
- ustring(size_type n, char c);
+ GLIBMM_API ustring(size_type n, char c);
/*! Construct a ustring as a copy of a range.
* @param pbegin Start of range.
@@ -436,19 +436,19 @@ public:
//! @name Assign new contents.
//! @{
- ustring& operator=(const std::string& src);
- ustring& operator=(std::string&& src);
- ustring& operator=(const char* src);
- ustring& operator=(gunichar uc);
- ustring& operator=(char c);
-
- ustring& assign(const ustring& src);
- ustring& assign(ustring&& src);
- ustring& assign(const ustring& src, size_type i, size_type n);
- ustring& assign(const char* src, size_type n);
- ustring& assign(const char* src);
- ustring& assign(size_type n, gunichar uc);
- ustring& assign(size_type n, char c);
+ GLIBMM_API ustring& operator=(const std::string& src);
+ GLIBMM_API ustring& operator=(std::string&& src);
+ GLIBMM_API ustring& operator=(const char* src);
+ GLIBMM_API ustring& operator=(gunichar uc);
+ GLIBMM_API ustring& operator=(char c);
+
+ GLIBMM_API ustring& assign(const ustring& src);
+ GLIBMM_API ustring& assign(ustring&& src);
+ GLIBMM_API ustring& assign(const ustring& src, size_type i, size_type n);
+ GLIBMM_API ustring& assign(const char* src, size_type n);
+ GLIBMM_API ustring& assign(const char* src);
+ GLIBMM_API ustring& assign(size_type n, gunichar uc);
+ GLIBMM_API ustring& assign(size_type n, char c);
template <class In>
ustring& assign(In pbegin, In pend);
@@ -456,19 +456,19 @@ public:
//! @name Append to the string.
//! @{
- ustring& operator+=(const ustring& src);
- ustring& operator+=(const char* src);
- ustring& operator+=(gunichar uc);
- ustring& operator+=(char c);
- void push_back(gunichar uc);
- void push_back(char c);
-
- ustring& append(const ustring& src);
- ustring& append(const ustring& src, size_type i, size_type n);
- ustring& append(const char* src, size_type n);
- ustring& append(const char* src);
- ustring& append(size_type n, gunichar uc);
- ustring& append(size_type n, char c);
+ GLIBMM_API ustring& operator+=(const ustring& src);
+ GLIBMM_API ustring& operator+=(const char* src);
+ GLIBMM_API ustring& operator+=(gunichar uc);
+ GLIBMM_API ustring& operator+=(char c);
+ GLIBMM_API void push_back(gunichar uc);
+ GLIBMM_API void push_back(char c);
+
+ GLIBMM_API ustring& append(const ustring& src);
+ GLIBMM_API ustring& append(const ustring& src, size_type i, size_type n);
+ GLIBMM_API ustring& append(const char* src, size_type n);
+ GLIBMM_API ustring& append(const char* src);
+ GLIBMM_API ustring& append(size_type n, gunichar uc);
+ GLIBMM_API ustring& append(size_type n, char c);
template <class In>
ustring& append(In pbegin, In pend);
@@ -476,17 +476,17 @@ public:
//! @name Insert into the string.
//! @{
- ustring& insert(size_type i, const ustring& src);
- ustring& insert(size_type i, const ustring& src, size_type i2, size_type n);
- ustring& insert(size_type i, const char* src, size_type n);
- ustring& insert(size_type i, const char* src);
- ustring& insert(size_type i, size_type n, gunichar uc);
- ustring& insert(size_type i, size_type n, char c);
-
- iterator insert(iterator p, gunichar uc);
- iterator insert(iterator p, char c);
- void insert(iterator p, size_type n, gunichar uc);
- void insert(iterator p, size_type n, char c);
+ GLIBMM_API ustring& insert(size_type i, const ustring& src);
+ GLIBMM_API ustring& insert(size_type i, const ustring& src, size_type i2, size_type n);
+ GLIBMM_API ustring& insert(size_type i, const char* src, size_type n);
+ GLIBMM_API ustring& insert(size_type i, const char* src);
+ GLIBMM_API ustring& insert(size_type i, size_type n, gunichar uc);
+ GLIBMM_API ustring& insert(size_type i, size_type n, char c);
+
+ GLIBMM_API iterator insert(iterator p, gunichar uc);
+ GLIBMM_API iterator insert(iterator p, char c);
+ GLIBMM_API void insert(iterator p, size_type n, gunichar uc);
+ GLIBMM_API void insert(iterator p, size_type n, char c);
template <class In>
void insert(iterator p, In pbegin, In pend);
@@ -494,18 +494,18 @@ public:
//! @name Replace sub-strings.
//! @{
- ustring& replace(size_type i, size_type n, const ustring& src);
- ustring& replace(size_type i, size_type n, const ustring& src, size_type i2, size_type n2);
- ustring& replace(size_type i, size_type n, const char* src, size_type n2);
- ustring& replace(size_type i, size_type n, const char* src);
- ustring& replace(size_type i, size_type n, size_type n2, gunichar uc);
- ustring& replace(size_type i, size_type n, size_type n2, char c);
-
- ustring& replace(iterator pbegin, iterator pend, const ustring& src);
- ustring& replace(iterator pbegin, iterator pend, const char* src, size_type n);
- ustring& replace(iterator pbegin, iterator pend, const char* src);
- ustring& replace(iterator pbegin, iterator pend, size_type n, gunichar uc);
- ustring& replace(iterator pbegin, iterator pend, size_type n, char c);
+ GLIBMM_API ustring& replace(size_type i, size_type n, const ustring& src);
+ GLIBMM_API ustring& replace(size_type i, size_type n, const ustring& src, size_type i2, size_type n2);
+ GLIBMM_API ustring& replace(size_type i, size_type n, const char* src, size_type n2);
+ GLIBMM_API ustring& replace(size_type i, size_type n, const char* src);
+ GLIBMM_API ustring& replace(size_type i, size_type n, size_type n2, gunichar uc);
+ GLIBMM_API ustring& replace(size_type i, size_type n, size_type n2, char c);
+
+ GLIBMM_API ustring& replace(iterator pbegin, iterator pend, const ustring& src);
+ GLIBMM_API ustring& replace(iterator pbegin, iterator pend, const char* src, size_type n);
+ GLIBMM_API ustring& replace(iterator pbegin, iterator pend, const char* src);
+ GLIBMM_API ustring& replace(iterator pbegin, iterator pend, size_type n, gunichar uc);
+ GLIBMM_API ustring& replace(iterator pbegin, iterator pend, size_type n, char c);
template <class In>
ustring& replace(iterator pbegin, iterator pend, In pbegin2, In pend2);
@@ -513,20 +513,20 @@ public:
//! @name Erase sub-strings.
//! @{
- void clear();
- ustring& erase(size_type i, size_type n = npos);
- ustring& erase();
- iterator erase(iterator p);
- iterator erase(iterator pbegin, iterator pend);
+ GLIBMM_API void clear();
+ GLIBMM_API ustring& erase(size_type i, size_type n = npos);
+ GLIBMM_API ustring& erase();
+ GLIBMM_API iterator erase(iterator p);
+ GLIBMM_API iterator erase(iterator pbegin, iterator pend);
//! @}
//! @name Compare and collate.
//! @{
- int compare(UStringView rhs) const;
- int compare(size_type i, size_type n, UStringView rhs) const;
- int compare(size_type i, size_type n, const ustring& rhs, size_type i2, size_type n2) const;
- int compare(size_type i, size_type n, const char* rhs, size_type n2) const;
+ GLIBMM_API int compare(UStringView rhs) const;
+ GLIBMM_API int compare(size_type i, size_type n, UStringView rhs) const;
+ GLIBMM_API int compare(size_type i, size_type n, const ustring& rhs, size_type i2, size_type n2) const;
+ GLIBMM_API int compare(size_type i, size_type n, const char* rhs, size_type n2) const;
/*! Create a unique sorting key for the UTF-8 string. If you need to
* compare UTF-8 strings regularly, e.g. for sorted containers such as
@@ -539,93 +539,93 @@ public:
* the current locale. Converting both operands to UCS-4 is just the first
* of several costly steps involved when comparing ustrings. So be careful.
*/
- std::string collate_key() const;
+ GLIBMM_API std::string collate_key() const;
/*! Create a unique key for the UTF-8 string that can be used for caseless
* sorting. <tt>ustr.casefold_collate_key()</tt> results in the same string
* as <tt>ustr.casefold().collate_key()</tt>, but the former is likely more
* efficient.
*/
- std::string casefold_collate_key() const;
+ GLIBMM_API std::string casefold_collate_key() const;
//! @}
//! @name Extract characters and sub-strings.
//! @{
/*! No reference return; use replace() to write characters. */
- value_type operator[](size_type i) const;
+ GLIBMM_API value_type operator[](size_type i) const;
/*! No reference return; use replace() to write characters. @throw std::out_of_range */
- value_type at(size_type i) const;
+ GLIBMM_API value_type at(size_type i) const;
- inline ustring substr(size_type i = 0, size_type n = npos) const;
+ GLIBMM_API inline ustring substr(size_type i = 0, size_type n = npos) const;
//! @}
//! @name Access a sequence of characters.
//! @{
- iterator begin();
- iterator end();
- const_iterator begin() const;
- const_iterator end() const;
- reverse_iterator rbegin();
- reverse_iterator rend();
- const_reverse_iterator rbegin() const;
- const_reverse_iterator rend() const;
+ GLIBMM_API iterator begin();
+ GLIBMM_API iterator end();
+ GLIBMM_API const_iterator begin() const;
+ GLIBMM_API const_iterator end() const;
+ GLIBMM_API reverse_iterator rbegin();
+ GLIBMM_API reverse_iterator rend();
+ GLIBMM_API const_reverse_iterator rbegin() const;
+ GLIBMM_API const_reverse_iterator rend() const;
/**
* @newin{2,52}
*/
- const_iterator cbegin() const;
+ GLIBMM_API const_iterator cbegin() const;
/**
* @newin{2,52}
*/
- const_iterator cend() const;
+ GLIBMM_API const_iterator cend() const;
//! @}
//! @name Find sub-strings.
//! @{
- size_type find(const ustring& str, size_type i = 0) const;
- size_type find(const char* str, size_type i, size_type n) const;
- size_type find(const char* str, size_type i = 0) const;
- size_type find(gunichar uc, size_type i = 0) const;
- size_type find(char c, size_type i = 0) const;
+ GLIBMM_API size_type find(const ustring& str, size_type i = 0) const;
+ GLIBMM_API size_type find(const char* str, size_type i, size_type n) const;
+ GLIBMM_API size_type find(const char* str, size_type i = 0) const;
+ GLIBMM_API size_type find(gunichar uc, size_type i = 0) const;
+ GLIBMM_API size_type find(char c, size_type i = 0) const;
- size_type rfind(const ustring& str, size_type i = npos) const;
- size_type rfind(const char* str, size_type i, size_type n) const;
- size_type rfind(const char* str, size_type i = npos) const;
- size_type rfind(gunichar uc, size_type i = npos) const;
- size_type rfind(char c, size_type i = npos) const;
+ GLIBMM_API size_type rfind(const ustring& str, size_type i = npos) const;
+ GLIBMM_API size_type rfind(const char* str, size_type i, size_type n) const;
+ GLIBMM_API size_type rfind(const char* str, size_type i = npos) const;
+ GLIBMM_API size_type rfind(gunichar uc, size_type i = npos) const;
+ GLIBMM_API size_type rfind(char c, size_type i = npos) const;
//! @}
//! @name Match against a set of characters.
//! @{
- size_type find_first_of(const ustring& match, size_type i = 0) const;
- size_type find_first_of(const char* match, size_type i, size_type n) const;
- size_type find_first_of(const char* match, size_type i = 0) const;
- size_type find_first_of(gunichar uc, size_type i = 0) const;
- size_type find_first_of(char c, size_type i = 0) const;
-
- size_type find_last_of(const ustring& match, size_type i = npos) const;
- size_type find_last_of(const char* match, size_type i, size_type n) const;
- size_type find_last_of(const char* match, size_type i = npos) const;
- size_type find_last_of(gunichar uc, size_type i = npos) const;
- size_type find_last_of(char c, size_type i = npos) const;
-
- size_type find_first_not_of(const ustring& match, size_type i = 0) const;
- size_type find_first_not_of(const char* match, size_type i, size_type n) const;
- size_type find_first_not_of(const char* match, size_type i = 0) const;
- size_type find_first_not_of(gunichar uc, size_type i = 0) const;
- size_type find_first_not_of(char c, size_type i = 0) const;
-
- size_type find_last_not_of(const ustring& match, size_type i = npos) const;
- size_type find_last_not_of(const char* match, size_type i, size_type n) const;
- size_type find_last_not_of(const char* match, size_type i = npos) const;
- size_type find_last_not_of(gunichar uc, size_type i = npos) const;
- size_type find_last_not_of(char c, size_type i = npos) const;
+ GLIBMM_API size_type find_first_of(const ustring& match, size_type i = 0) const;
+ GLIBMM_API size_type find_first_of(const char* match, size_type i, size_type n) const;
+ GLIBMM_API size_type find_first_of(const char* match, size_type i = 0) const;
+ GLIBMM_API size_type find_first_of(gunichar uc, size_type i = 0) const;
+ GLIBMM_API size_type find_first_of(char c, size_type i = 0) const;
+
+ GLIBMM_API size_type find_last_of(const ustring& match, size_type i = npos) const;
+ GLIBMM_API size_type find_last_of(const char* match, size_type i, size_type n) const;
+ GLIBMM_API size_type find_last_of(const char* match, size_type i = npos) const;
+ GLIBMM_API size_type find_last_of(gunichar uc, size_type i = npos) const;
+ GLIBMM_API size_type find_last_of(char c, size_type i = npos) const;
+
+ GLIBMM_API size_type find_first_not_of(const ustring& match, size_type i = 0) const;
+ GLIBMM_API size_type find_first_not_of(const char* match, size_type i, size_type n) const;
+ GLIBMM_API size_type find_first_not_of(const char* match, size_type i = 0) const;
+ GLIBMM_API size_type find_first_not_of(gunichar uc, size_type i = 0) const;
+ GLIBMM_API size_type find_first_not_of(char c, size_type i = 0) const;
+
+ GLIBMM_API size_type find_last_not_of(const ustring& match, size_type i = npos) const;
+ GLIBMM_API size_type find_last_not_of(const char* match, size_type i, size_type n) const;
+ GLIBMM_API size_type find_last_not_of(const char* match, size_type i = npos) const;
+ GLIBMM_API size_type find_last_not_of(gunichar uc, size_type i = npos) const;
+ GLIBMM_API size_type find_last_not_of(char c, size_type i = npos) const;
//! @}
//! @name Retrieve the string's size.
@@ -634,75 +634,75 @@ public:
/** Returns true if the string is empty. Equivalent to *this == "".
* @result Whether the string is empty.
*/
- bool empty() const;
+ GLIBMM_API bool empty() const;
/** Returns the number of characters in the string, not including any null-termination.
* @result The number of UTF-8 characters.
*
* @see bytes(), empty()
*/
- size_type size() const;
+ GLIBMM_API size_type size() const;
// We have length() as well as size(), because std::string has both.
/** This is the same as size().
*/
- size_type length() const;
+ GLIBMM_API size_type length() const;
/** Returns the number of bytes in the string, not including any null-termination.
* @result The number of bytes.
*
* @see size(), empty()
*/
- size_type bytes() const;
+ GLIBMM_API size_type bytes() const;
//! @}
//! @name Change the string's size.
//! @{
- void resize(size_type n, gunichar uc);
- void resize(size_type n, char c = '\0');
+ GLIBMM_API void resize(size_type n, gunichar uc);
+ GLIBMM_API void resize(size_type n, char c = '\0');
//! @}
//! @name Control the allocated memory.
//! @{
- size_type capacity() const;
- size_type max_size() const;
- void reserve(size_type n = 0);
+ GLIBMM_API size_type capacity() const;
+ GLIBMM_API size_type max_size() const;
+ GLIBMM_API void reserve(size_type n = 0);
//! @}
//! @name Get a per-byte representation of the string.
//! @{
- inline operator std::string() const; // e.g. std::string str = ustring();
- inline const std::string& raw() const;
+ GLIBMM_API inline operator std::string() const; // e.g. std::string str = ustring();
+ GLIBMM_API inline const std::string& raw() const;
// Not necessarily an ASCII char*. Use g_utf8_*() where necessary.
- const char* data() const;
- const char* c_str() const;
+ GLIBMM_API const char* data() const;
+ GLIBMM_API const char* c_str() const;
/*! @return Number of copied @em bytes, not characters. */
- size_type copy(char* dest, size_type n, size_type i = 0) const;
+ GLIBMM_API size_type copy(char* dest, size_type n, size_type i = 0) const;
//! @}
//! @name UTF-8 utilities.
//! @{
/*! Check whether the string is valid UTF-8. */
- bool validate() const;
+ GLIBMM_API bool validate() const;
/*! Check whether the string is valid UTF-8. */
- bool validate(iterator& first_invalid);
+ GLIBMM_API bool validate(iterator& first_invalid);
/*! Check whether the string is valid UTF-8. */
- bool validate(const_iterator& first_invalid) const;
+ GLIBMM_API bool validate(const_iterator& first_invalid) const;
/*! Return a copy that is a valid UTF-8 string replacing invalid bytes in the
* original with %Unicode replacement character (U+FFFD).
* If the string is valid, return a copy of it.
*/
- ustring make_valid() const;
+ GLIBMM_API ustring make_valid() const;
/*! Check whether the string is plain 7-bit ASCII. @par
* Unlike any other ustring method, is_ascii() is safe to use on invalid
@@ -710,10 +710,10 @@ public:
* ASCII either, therefore is_ascii() will just return @c false then.
* @return Whether the string contains only ASCII characters.
*/
- bool is_ascii() const;
+ GLIBMM_API bool is_ascii() const;
/*! "Normalize" the %Unicode character representation of the string. */
- ustring normalize(NormalizeMode mode = NormalizeMode::DEFAULT_COMPOSE) const;
+ GLIBMM_API ustring normalize(NormalizeMode mode = NormalizeMode::DEFAULT_COMPOSE) const;
//! @}
//! @name Character case conversion.
@@ -726,21 +726,21 @@ public:
* <tt>&quot;&szlig;&quot;</tt> will be replaced by two characters
* <tt>"SS"</tt> because there is no capital <tt>&quot;&szlig;&quot;</tt>.
*/
- ustring uppercase() const;
+ GLIBMM_API ustring uppercase() const;
/*! Returns a new UTF-8 string with all characters characters converted to
* their lowercase equivalent, while honoring the current locale. The
* resulting string may change in the number of bytes as well as in the
* number of characters.
*/
- ustring lowercase() const;
+ GLIBMM_API ustring lowercase() const;
/*! Returns a caseless representation of the UTF-8 string. The resulting
* string doesn't correspond to any particular case, therefore the result
* is only useful to compare strings and should never be displayed to the
* user.
*/
- ustring casefold() const;
+ GLIBMM_API ustring casefold() const;
//! @}
//! @name Message formatting.
@@ -749,7 +749,7 @@ public:
/* Returns fmt as is, but checks for invalid references in the format string.
* @newin{2,18}
*/
- static inline ustring compose(const ustring& fmt);
+ GLIBMM_API static inline ustring compose(const ustring& fmt);
/*! Substitute placeholders in a format string with the referenced arguments.
*
@@ -898,7 +898,7 @@ public:
*
* @newin{2,62}
*/
- static inline ustring sprintf(const ustring& fmt);
+ GLIBMM_API static inline ustring sprintf(const ustring& fmt);
/*! Overload of sprintf() for a format string only, which returns it unchanged
* and avoids creating a temporary ustring as the argument.
@@ -908,7 +908,7 @@ public:
*
* @newin{2,62}
*/
- static inline ustring sprintf(const char* fmt);
+ GLIBMM_API static inline ustring sprintf(const char* fmt);
//! @}
@@ -932,13 +932,13 @@ private:
template <class T>
class Stringify;
- static ustring compose_private(const ustring& fmt, std::initializer_list<const ustring*> ilist);
+ GLIBMM_API static ustring compose_private(const ustring& fmt, std::initializer_list<const ustring*> ilist);
class FormatStream;
template<class T> static inline const T& sprintify(const T& arg);
- static inline const char* sprintify(const ustring& arg);
- static inline const char* sprintify(const std::string& arg);
+ GLIBMM_API static inline const char* sprintify(const ustring& arg);
+ GLIBMM_API static inline const char* sprintify(const std::string& arg);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
@@ -965,24 +965,24 @@ struct ustring::SequenceToString<In, gunichar> : public std::string
};
template <>
-struct GLIBMM_API ustring::SequenceToString<Glib::ustring::iterator, gunichar> : public std::string
+struct ustring::SequenceToString<Glib::ustring::iterator, gunichar> : public std::string
{
- SequenceToString(Glib::ustring::iterator pbegin, Glib::ustring::iterator pend);
+ GLIBMM_API SequenceToString(Glib::ustring::iterator pbegin, Glib::ustring::iterator pend);
};
template <>
-struct GLIBMM_API ustring::SequenceToString<Glib::ustring::const_iterator, gunichar> : public std::string
+struct ustring::SequenceToString<Glib::ustring::const_iterator, gunichar> : public std::string
{
- SequenceToString(Glib::ustring::const_iterator pbegin, Glib::ustring::const_iterator pend);
+ GLIBMM_API SequenceToString(Glib::ustring::const_iterator pbegin, Glib::ustring::const_iterator pend);
};
-class GLIBMM_API ustring::FormatStream
+class ustring::FormatStream
{
public:
// noncopyable
- FormatStream(const ustring::FormatStream&) = delete;
- FormatStream& operator=(const ustring::FormatStream&) = delete;
+ GLIBMM_API FormatStream(const ustring::FormatStream&) = delete;
+ GLIBMM_API FormatStream& operator=(const ustring::FormatStream&) = delete;
private:
#ifdef GLIBMM_HAVE_WIDE_STREAM
@@ -993,18 +993,18 @@ private:
StreamType stream_;
public:
- FormatStream();
- ~FormatStream() noexcept;
+ GLIBMM_API FormatStream();
+ GLIBMM_API ~FormatStream() noexcept;
template <class T>
inline void stream(const T& value);
- inline void stream(const char* value);
+ GLIBMM_API inline void stream(const char* value);
// This overload exists to avoid the templated stream() being called for non-const char*.
- inline void stream(char* value);
+ GLIBMM_API inline void stream(char* value);
- ustring to_string() const;
+ GLIBMM_API ustring to_string() const;
};
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
diff --git a/glib/glibmm/variantdbusstring.h b/glib/glibmm/variantdbusstring.h
index ced63b8c..f6a6e75a 100644
--- a/glib/glibmm/variantdbusstring.h
+++ b/glib/glibmm/variantdbusstring.h
@@ -36,7 +36,7 @@ namespace Glib
* @newin{2,54}
* @ingroup Variant
*/
-class GLIBMM_API DBusObjectPathString : public Glib::ustring
+class DBusObjectPathString : public Glib::ustring
{
public:
using Glib::ustring::ustring;
@@ -53,7 +53,7 @@ public:
* @newin{2,54}
* @ingroup Variant
*/
-class GLIBMM_API DBusSignatureString : public Glib::ustring
+class DBusSignatureString : public Glib::ustring
{
public:
using Glib::ustring::ustring;
diff --git a/meson.build b/meson.build
index 2f7144a5..df3bf517 100644
--- a/meson.build
+++ b/meson.build
@@ -209,7 +209,7 @@ msvc14x_toolset_ver = ''
# that should not be overlooked stand out.
if is_msvc
disabled_warnings = cpp_compiler.get_supported_arguments([
- '/FImsvc_recommended_pragmas.h', '/wd4251', '/wd4275', '/wd4267', '/wd4530', '/wd4589', '/utf-8'
+ '/FImsvc_recommended_pragmas.h', '/wd4267', '/EHsc', '/utf-8'
])
add_project_arguments(disabled_warnings, language: 'cpp')
diff --git a/tools/m4/gerror.m4 b/tools/m4/gerror.m4
index 4dabb037..01036f06 100644
--- a/tools/m4/gerror.m4
+++ b/tools/m4/gerror.m4
@@ -17,7 +17,7 @@ ifelse(`$6',,,`dnl
/** $6
*/
')dnl
-class $9 __CPPNAME__ : public Glib::Error
+class __CPPNAME__ : public Glib::Error
{
public:
/** $7
@@ -27,14 +27,14 @@ public:
$4
};
- __CPPNAME__`'(Code error_code, const Glib::ustring& error_message);
- explicit __CPPNAME__`'(GError* gobject);
- Code code() const;
+ $9 __CPPNAME__`'(Code error_code, const Glib::ustring& error_message);
+ $9 explicit __CPPNAME__`'(GError* gobject);
+ $9 Code code() const;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
- static void throw_func(GError* gobject);
+ $9 static void throw_func(GError* gobject);
friend $9 void wrap_init(); // uses throw_func()