GNOME Bugzilla – Bug 660361
[PATCH] Invalid libpeas-1.0 bindings for ExtensionSet and Activatable
Last modified: 2012-06-28 06:48:26 UTC
In the current libpeas-1.0 bindings there is no constructor available for ExtensionSet. Furthermore should the interface Activatable not expose an object. See attached patch to fix those issues.
Created attachment 197667 [details] [review] Fixing libpeas binding
Thanks for the patch. Why hide .newv? And why "object" shouldn't be exposed (I see it in the docs)?
Wow what quick answer ;). Thanks. Well, both methods create invalid c code when used. newv should actually be a constructor I suppose. When implementing the interface Activatable following error occur during compilation: error: ‘PeasActivatableInterface’ has no member named ‘get_object’ error: ‘PeasActivatableInterface’ has no member named ‘set_object’ But well removing it might not be the solution that might be true ;).
(In reply to comment #3) > Well, both methods create invalid c code when used. > > newv should actually be a constructor I suppose. In what way it generates invalid C code? The fact that it should be a constructor it's a GIR problem, and it's fully possible to use a constructor as static method. > > When implementing the interface Activatable following error occur during > compilation: > error: ‘PeasActivatableInterface’ has no member named ‘get_object’ > error: ‘PeasActivatableInterface’ has no member named ‘set_object’ > That's something that shouldn't happen given there's [NoAccessorMethod]. Can you please provide a test case for both issues?
Created attachment 197678 [details] Activatable sample The first issue with newv has disappeared ;). It seems that a debian package added a libpeas-1.0.vapi to /usr/share/vala/vapi which had a invalid marked constructor newv. However when using the static method of the libpeas vapi file provided by vala, it works as expected. To reproduce the issue with the Activatable interface see attached sample.
The compiler must inherit NoAccessorMethod when implementing such an interface. See bug 658006.
commit 6b40d182a7775b23f11ed9cfd91eb01eb693f4b7 Author: Oliver Sauder <os@esite.ch> Date: Wed Sep 28 18:28:13 2011 +0200 libpeas-1.0: Add missing ExtensionSet constructor Partially fixes bug 660361. About the debian package shipping libpeas, packages except the library and vala shouldn't ship foreign vapis. They should be kept internal to the application. That is, if libpeas decides to ship a vapi is ok, but not others. So that has to be noticed to the debian package (or upstream).
> About the debian package shipping libpeas, packages except the library and vala > shouldn't ship foreign vapis. They should be kept internal to the application. > That is, if libpeas decides to ship a vapi is ok, but not others. So that has > to be noticed to the debian package (or upstream). I will send a notice to the debian maintainer of the libpeas package.
AFAICT fixing bug #658006 finished resolving this issue. Please re-open if I'm missing something.