Commit 3629def0 authored by Chun-wei Fan's avatar Chun-wei Fan
Browse files

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
parent f31aad39
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment