[gtk+] gtkmain: Fix build on Windows
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkmain: Fix build on Windows
- Date: Fri, 20 Jan 2017 11:50:15 +0000 (UTC)
commit 3629def0d0a5ce8eec39603a0c3658aae565506e
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Jan 20 18:38:53 2017 +0800
gtkmain: Fix build on Windows
gtk_init() removed its support for supporting arguments, so we ought to do
likewise for Windows, which actually defines items that call gtk_init()
the old way (and also get rid of argument support in those functions,
since the direction is to not support them).
https://bugzilla.gnome.org/show_bug.cgi?id=773299
gtk/gtkmain.c | 8 ++++----
gtk/gtkmain.h | 12 ++++--------
2 files changed, 8 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 6aaee9e..a64e98f 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -875,21 +875,21 @@ check_sizeof_GtkBox (size_t sizeof_GtkBox)
* in the number of extra args.
*/
void
-gtk_init_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox)
+gtk_init_abi_check (int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox)
{
check_sizeof_GtkWindow (sizeof_GtkWindow);
if (num_checks >= 2)
check_sizeof_GtkBox (sizeof_GtkBox);
- gtk_init (argc, argv);
+ gtk_init ();
}
gboolean
-gtk_init_check_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow, size_t
sizeof_GtkBox)
+gtk_init_check_abi_check (int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox)
{
check_sizeof_GtkWindow (sizeof_GtkWindow);
if (num_checks >= 2)
check_sizeof_GtkBox (sizeof_GtkBox);
- return gtk_init_check (argc, argv);
+ return gtk_init_check ();
}
#endif
diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h
index c9e660a..49e19c9 100644
--- a/gtk/gtkmain.h
+++ b/gtk/gtkmain.h
@@ -84,20 +84,16 @@ gboolean gtk_init_check (void);
* when building GTK+-using code.
*/
GDK_AVAILABLE_IN_ALL
-void gtk_init_abi_check (int *argc,
- char ***argv,
- int num_checks,
+void gtk_init_abi_check (int num_checks,
size_t sizeof_GtkWindow,
size_t sizeof_GtkBox);
GDK_AVAILABLE_IN_ALL
-gboolean gtk_init_check_abi_check (int *argc,
- char ***argv,
- int num_checks,
+gboolean gtk_init_check_abi_check (int num_checks,
size_t sizeof_GtkWindow,
size_t sizeof_GtkBox);
-#define gtk_init(argc, argv) gtk_init_abi_check (argc, argv, 2, sizeof (GtkWindow), sizeof (GtkBox))
-#define gtk_init_check(argc, argv) gtk_init_check_abi_check (argc, argv, 2, sizeof (GtkWindow), sizeof
(GtkBox))
+#define gtk_init() gtk_init_abi_check (2, sizeof (GtkWindow), sizeof (GtkBox))
+#define gtk_init_check() gtk_init_check_abi_check (2, sizeof (GtkWindow), sizeof (GtkBox))
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]