File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 44 *
55 */
66
7- # include <girepository.h>
7+ // compatibility with girepository-1.0 and 2.0
8+ #if __has_include (< girepository .h > ) // girepository-1.0
9+ #include <girepository.h>
10+ #define gi_repository_get_option_group g_irepository_get_option_group
11+ #else
12+ #include <girepository/girepository.h>
13+ #endif
814
915# include "astroid_activatable.h"
1016
@@ -14,7 +20,7 @@ int main (int argc, char ** argv) {
1420 GError * error = NULL ;
1521
1622 ctx = g_option_context_new (NULL );
17- g_option_context_add_group (ctx , g_irepository_get_option_group ());
23+ g_option_context_add_group (ctx , gi_repository_get_option_group ());
1824
1925 if (!g_option_context_parse (ctx , & argc , & argv , & error )) {
2026 g_print ("astroid girmain: %s\n" , error -> message );
You can’t perform that action at this time.
0 commit comments