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 626622 - Add way to get a PeasExtension from a PeasPluginInfo
Add way to get a PeasExtension from a PeasPluginInfo
Status: RESOLVED FIXED
Product: libpeas
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: libpeas-maint
libpeas-maint
Depends on:
Blocks: 626553
 
 
Reported: 2010-08-11 12:38 UTC by Bastien Nocera
Modified: 2010-08-16 19:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add way to get a PeasExtension from a PeasPluginInfo (2.25 KB, patch)
2010-08-11 12:38 UTC, Bastien Nocera
none Details | Review
Add way to get a PeasExtension from a PeasExtensionSet (2.93 KB, patch)
2010-08-14 12:03 UTC, Steve Frécinaux
committed Details | Review

Description Bastien Nocera 2010-08-11 12:38:13 UTC
As discussed on IRC
Comment 1 Bastien Nocera 2010-08-11 12:38:15 UTC
Created attachment 167592 [details] [review]
Add way to get a PeasExtension from a PeasPluginInfo

So that applications do not need to do their own book-keeping
of the existing PeasExtensions.
Comment 2 Steve Frécinaux 2010-08-14 12:03:36 UTC
Created attachment 167865 [details] [review]
Add way to get a PeasExtension from a PeasExtensionSet

So that applications do not need to do their own book-keeping
of the existing PeasExtensions.

This variant uses straight equality to compare plugin infos, and doesn't ref the returned object (which I think is more consistent with other libraries).
Comment 3 Ignacio Casal Quinteiro (nacho) 2010-08-14 15:49:57 UTC
Review of attachment 167865 [details] [review]:

Minor comment from my part.

::: libpeas/peas-extension-set.c
@@ +442,3 @@
+  for (l = set->priv->extensions; l != NULL; l = l->next)
+    {
+      ExtensionItem *item = l->data;

Don't you have to cast here?
Comment 4 Bastien Nocera 2010-08-16 13:09:45 UTC
(In reply to comment #3)
> Review of attachment 167865 [details] [review]:
> 
> Minor comment from my part.
> 
> ::: libpeas/peas-extension-set.c
> @@ +442,3 @@
> +  for (l = set->priv->extensions; l != NULL; l = l->next)
> +    {
> +      ExtensionItem *item = l->data;
> 
> Don't you have to cast here?

No, you don't.
Comment 5 Steve Frécinaux 2010-08-16 19:28:51 UTC
Attachment 167865 [details] pushed as 436e787 - Add way to get a PeasExtension from a PeasExtensionSet