[geany/geany-plugins] 62d452: git-changebar: Add support for building with libgit2 >= 0.22
Colomban Wendling
git-noreply at xxxxx
Mon Feb 16 16:06:00 UTC 2015
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Mon, 16 Feb 2015 16:06:00 UTC
Commit: 62d45210db2c43918fef01e67d5f18fc5ddd2372
https://github.com/geany/geany-plugins/commit/62d45210db2c43918fef01e67d5f18fc5ddd2372
Log Message:
-----------
git-changebar: Add support for building with libgit2 >= 0.22
Modified Paths:
--------------
git-changebar/src/gcb-plugin.c
Modified: git-changebar/src/gcb-plugin.c
9 lines changed, 7 insertions(+), 2 deletions(-)
===================================================================
@@ -32,6 +32,11 @@
#include <geany.h>
#include <document.h>
+#if ! defined (LIBGIT2_SOVERSION) || LIBGIT2_SOVERSION < 22
+# define git_libgit2_init git_threads_init
+# define git_libgit2_shutdown git_threads_shutdown
+#endif
+
GeanyPlugin *geany_plugin;
GeanyData *geany_data;
@@ -1017,7 +1022,7 @@ plugin_init (GeanyData *data)
G_thread = NULL;
G_queue = NULL;
- if (git_threads_init () != 0) {
+ if (git_libgit2_init () < 0) {
const git_error *err = giterr_last ();
g_warning ("Failed to initialize libgit2: %s", err ? err->message : "?");
return;
@@ -1069,7 +1074,7 @@ plugin_cleanup (void)
save_config ();
- git_threads_shutdown ();
+ git_libgit2_shutdown ();
}
/* --- configuration dialog --- */
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Plugins-Commits
mailing list