GNOME Bugzilla – Bug 655192
Wrong libgdata bindings for DocumentsService.query_documents
Last modified: 2011-08-11 15:57:30 UTC
I am looking for a vala example using GData. I keep getting errors on the one I have found. I want to access documents and spreadsheets. https://code.launchpad.net/~doctormo/.../gdata-vala-experiments I posted on the vala mailing list and it was suggested that I submit a bug. I get the following error running the code snippet I found as is. gdata_experiments.vala:26.24-26.75: error: 1 missing arguments for `GData.DocumentsFeed GData.DocumentsService.query_documents (GData.DocumentsQuery query, GLib.Cancellable cancellable, GData.QueryProgressCallback progress_callback, void* progress_user_data)' var feed = this.gdocs.query_documents (query, cancel, () => {}); I looked at valadoc api documentation and it indicates an additional parameter of type void* (not sure what this is exactly - gpointer according to the header file), so I add a null as the last parameter and then I get the following error. gdata_experiments.c:134:3: error: too many arguments to function ‘gdata_documents_service_query_documents’ /usr/include/libgdata/gdata/services/documents/gdata-documents-service.h:84:21: note: declared here ////////////////// copied from gdata-documents-service.h: GDataDocumentsFeed *gdata_documents_service_query_documents (GDataDocumentsService *self, GDataDocumentsQuery *query, GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC; ////////////////// The vala code - original: var feed = this.gdocs.query_documents (query, cancel, () => {}); ////////////////// The c code - generated: _tmp2_ = gdata_documents_service_query_documents (self->priv->gdocs,query, cancel, __lambda1__gdata_query_progress_callback ,self, NULL,&_inner_error_); _tmp3_ = _g_object_ref0 (_tmp2_); feed = _tmp3_; $ pkg-config --modversion libgdata 0.8.0 $ valac --version Vala 0.13.1 On Sat, Jul 23, 2011 at 2:25 PM, Luca Bruno <lethalman88@gmail.com> wrote: > I feel like the code snippet used GData gir, since libgdata.vapi is buggy > (that void* argument must be dropped). > You can report a bug to http://bugzilla.gnome.org .
Thanks for the bug report. There's an ongoing transition to use the gir for generating libgdata that will fix many bugs like this.
Very good. keep up the good work.
commit e30d045342ac4f865857a3eeb8d4698daef0b589 Author: Luca Bruno <lucabru@src.gnome.org> Date: Sun Jul 24 21:23:46 2011 +0200 libgdata: Switch to GIR Fixes bug 655192. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.