[glibmm] giomm: Use ifdef in _WRAP_METHOD()s surrounded by #ifdefs.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] giomm: Use ifdef in _WRAP_METHOD()s surrounded by #ifdefs.
- Date: Tue, 10 Aug 2010 04:46:11 +0000 (UTC)
commit 07faf513ea70b65b79e9f3a9977dc287a012d849
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Tue Aug 10 00:36:26 2010 -0400
giomm: Use ifdef in _WRAP_METHOD()s surrounded by #ifdefs.
* gio/src/credentials.hg:
* gio/src/dbusmessage.ccg:
* gio/src/dbusmessage.hg: Use the ifdef option in the _WRAP_METHOD()s
that wrap C functions that are built based on #ifdef conditions. This
allows the #ifdefs to be generated in the .cc files also.
* gio/src/unixconnection.hg (receive_credentials): Use constversion
in the _WRAP_METHOD() of the constant version so that the code of the
non-constant version is used instead of generated new code.
* gio/src/unixfdlist.hg: _IGNORE() C functions that are handwritten.
(UnixFDList): Use explicit for single parameter constructor.
ChangeLog | 17 +++++++++++++++++
gio/src/credentials.hg | 6 ++----
gio/src/dbusmessage.ccg | 2 ++
gio/src/dbusmessage.hg | 8 ++++----
gio/src/unixconnection.hg | 2 +-
gio/src/unixfdlist.hg | 4 +++-
6 files changed, 29 insertions(+), 10 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6ec5cde..edf027f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2010-08-10 José Alburquerque <jaalburqu svn gnome org>
+
+ giomm: Use ifdef in _WRAP_METHOD()s surrounded by #ifdefs.
+
+ * gio/src/credentials.hg:
+ * gio/src/dbusmessage.ccg:
+ * gio/src/dbusmessage.hg: Use the ifdef option in the _WRAP_METHOD()s
+ that wrap C functions that are built based on #ifdef conditions. This
+ allows the #ifdefs to be generated in the .cc files also.
+
+ * gio/src/unixconnection.hg (receive_credentials): Use constversion
+ in the _WRAP_METHOD() of the constant version so that the code of the
+ non-constant version is used instead of generated new code.
+
+ * gio/src/unixfdlist.hg: _IGNORE() C functions that are handwritten.
+ (UnixFDList): Use explicit for single parameter constructor.
+
2010-08-06 José Alburquerque <jaalburqu svn gnome org>
glibmm: VariantBase: Correct typo in docs.
diff --git a/gio/src/credentials.hg b/gio/src/credentials.hg
index 2bf3cbd..d2c0d47 100644
--- a/gio/src/credentials.hg
+++ b/gio/src/credentials.hg
@@ -48,10 +48,8 @@ public:
_WRAP_METHOD(void set_native(CredentialsType native_type, gpointer native), g_credentials_set_native)
_WRAP_METHOD(bool is_same_user(const Glib::RefPtr<const Credentials>& other_credentials), g_credentials_is_same_user, errthrow)
-#ifdef G_OS_UNIX
- _WRAP_METHOD(uid_t get_unix_user(), g_credentials_get_unix_user, errthrow)
- _WRAP_METHOD(bool set_unix_user(uid_t uid), g_credentials_set_unix_user, errthrow)
-#endif //G_OS_UNIX
+ _WRAP_METHOD(uid_t get_unix_user(), g_credentials_get_unix_user, errthrow, ifdef G_OS_UNX)
+ _WRAP_METHOD(bool set_unix_user(uid_t uid), g_credentials_set_unix_user, errthrow, ifdef G_OS_UNIX)
};
diff --git a/gio/src/dbusmessage.ccg b/gio/src/dbusmessage.ccg
index 500ae84..18a32fc 100644
--- a/gio/src/dbusmessage.ccg
+++ b/gio/src/dbusmessage.ccg
@@ -49,9 +49,11 @@ void DBusMessage::get_header(Glib::VariantBase& value,
value.init(g_value, true /* take a reference */);
}
+#ifdef G_OS_UNIX
void DBusMessage::unset_unix_fd_list()
{
g_dbus_message_set_unix_fd_list(gobj(), 0);
}
+#endif //G_OS_UNIX
} // namespace Gio
diff --git a/gio/src/dbusmessage.hg b/gio/src/dbusmessage.hg
index 25e0413..f0bea01 100644
--- a/gio/src/dbusmessage.hg
+++ b/gio/src/dbusmessage.hg
@@ -77,11 +77,11 @@ public:
_WRAP_METHOD(void set_body(const Glib::VariantBase& body), g_dbus_message_set_body)
-#ifdef G_OS_UNIX
- _WRAP_METHOD(Glib::RefPtr<UnixFDList> get_unix_fd_list(), g_dbus_message_get_unix_fd_list)
- _WRAP_METHOD(Glib::RefPtr<const UnixFDList> get_unix_fd_list() const, g_dbus_message_get_unix_fd_list, constversion)
- _WRAP_METHOD(void set_unix_fd_list(const Glib::RefPtr<UnixFDList>& fd_list), g_dbus_message_set_unix_fd_list)
+ _WRAP_METHOD(Glib::RefPtr<UnixFDList> get_unix_fd_list(), g_dbus_message_get_unix_fd_list, ifdef G_OS_UNIX)
+ _WRAP_METHOD(Glib::RefPtr<const UnixFDList> get_unix_fd_list() const, g_dbus_message_get_unix_fd_list, constversion, ifdef G_OS_UNIX)
+ _WRAP_METHOD(void set_unix_fd_list(const Glib::RefPtr<UnixFDList>& fd_list), g_dbus_message_set_unix_fd_list, ifdef G_OS_UNIX)
+#ifdef G_OS_UNIX
/** Clears the existing UNIX file descriptor list.
*/
void unset_unix_fd_list();
diff --git a/gio/src/unixconnection.hg b/gio/src/unixconnection.hg
index 00bcf10..ea89434 100644
--- a/gio/src/unixconnection.hg
+++ b/gio/src/unixconnection.hg
@@ -48,7 +48,7 @@ public:
_WRAP_METHOD(int receive_fd(const Glib::RefPtr<Cancellable>& cancellable), g_unix_connection_receive_fd, errthrow)
_WRAP_METHOD(Glib::RefPtr<Credentials> receive_credentials(const Glib::RefPtr<Cancellable>& cancellable), g_unix_connection_receive_credentials, errthrow)
- _WRAP_METHOD(Glib::RefPtr<const Credentials> receive_credentials(const Glib::RefPtr<Cancellable>& cancellable) const, g_unix_connection_receive_credentials, errthrow)
+ _WRAP_METHOD(Glib::RefPtr<const Credentials> receive_credentials(const Glib::RefPtr<Cancellable>& cancellable) const, g_unix_connection_receive_credentials, errthrow, constversion)
_WRAP_METHOD(bool send_credentials(const Glib::RefPtr<Cancellable>& cancellable), g_unix_connection_send_credentials, errthrow)
};
diff --git a/gio/src/unixfdlist.hg b/gio/src/unixfdlist.hg
index 1824eec..f6caf7a 100644
--- a/gio/src/unixfdlist.hg
+++ b/gio/src/unixfdlist.hg
@@ -44,7 +44,7 @@ protected:
_CTOR_DEFAULT
_IGNORE(g_unix_fd_list_new)
- UnixFDList(const Glib::ArrayHandle<int>& fds);
+ explicit UnixFDList(const Glib::ArrayHandle<int>& fds);
#m4 _CONVERSION(`const Glib::ArrayHandle<int>&', `const gint*', `$3.data()')
_WRAP_CTOR(UnixFDList(const Glib::ArrayHandle<int>& fds, int n_fds), g_unix_fd_list_new_from_array)
@@ -79,6 +79,7 @@ public:
* @newin{2,26}
*/
const Glib::ArrayHandle<int> peek_fds() const;
+ _IGNORE(g_unix_fd_list_peek_fds)
/** Returns the array of file descriptors that is contained in this object.
*
@@ -93,6 +94,7 @@ public:
* @newin{2,26}
*/
Glib::ArrayHandle<int> steal_fds();
+ _IGNORE(g_unix_fd_list_steal_fds)
_WRAP_METHOD(int append(int fd), g_unix_fd_list_append, errthrow)
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]