After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749597 - Add g_autoptr() autocleanup support
Add g_autoptr() autocleanup support
Status: RESOLVED FIXED
Product: libgit2-glib
Classification: Core
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: gitg-maint
gitg-maint
Depends on:
Blocks:
 
 
Reported: 2015-05-19 19:57 UTC by Garrett Regier
Modified: 2019-02-22 03:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add g_autoptr() autocleanup support (7.87 KB, patch)
2015-05-19 19:59 UTC, Garrett Regier
committed Details | Review

Description Garrett Regier 2015-05-19 19:57:33 UTC
This would be useful for Builder which uses g_autoptr() quite a bit.
Comment 1 Garrett Regier 2015-05-19 19:59:07 UTC
Created attachment 303620 [details] [review]
Add g_autoptr() autocleanup support

All of the types defined in ggit-types.h are included and the test programs compile.
Comment 2 Christian Hergert 2015-05-19 21:23:17 UTC
This looks great to me!
Comment 3 Paolo Borelli 2015-05-20 06:14:22 UTC
Review of attachment 303620 [details] [review]:

If you tested it, sure go ahead. One minor question below

::: libgit2-glib/ggit.h.in
@@ -22,2 +22,3 @@
 #define __GGIT_H__
 
+#include <libgit2-glib/ggit-autocleanup.h>

does it work with this as the first header? When I did it in gsv I had to put it last, I guess because the types have to be defined first...
Comment 4 Garrett Regier 2015-05-20 06:41:46 UTC
(In reply to Paolo Borelli from comment #3)
> Review of attachment 303620 [details] [review] [review]:
> 
> If you tested it, sure go ahead. One minor question below
> 
> ::: libgit2-glib/ggit.h.in
> @@ -22,2 +22,3 @@
>  #define __GGIT_H__
>  
> +#include <libgit2-glib/ggit-autocleanup.h>
> 
> does it work with this as the first header? When I did it in gsv I had to
> put it last, I guess because the types have to be defined first...

I directly included all of the types into ggit-autocleanup.h file instead of having them be included indirectly. I compiled the test/example programs until they completed without errors or warnings.
Comment 5 Garrett Regier 2015-05-20 06:43:03 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.