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 691354 - Introspection and gtk-doc fixes
Introspection and gtk-doc fixes
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 691214 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-01-08 17:39 UTC by Cosimo Cecchi
Modified: 2018-05-22 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Mark un-namespaced define as private (1.92 KB, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
committed Details | Review
ev-file-helpers: use correct syntax for gtk-doc comment (1.04 KB, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
committed Details | Review
ev-document: use right parameters name in gtk-doc comment (1002 bytes, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
committed Details | Review
ev-annotation: use correct variable names in function prototype (1.40 KB, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
committed Details | Review
ev-file-helpers: use same parameter name between header and function (4.25 KB, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
committed Details | Review
libdocument: add missing transfer and element-type annotations (13.30 KB, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
committed Details | Review
ev-mapping-list: make a boxed type (3.10 KB, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
committed Details | Review
ev-document-factory: make EvTypeInfo a boxed type (2.63 KB, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
none Details | Review
ev-document: remove non-existant methods (1.81 KB, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
accepted-commit_now Details | Review
ev-document: mark ev_document_synctex_forward_search() as skip (804 bytes, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
none Details | Review
ev-view: add missing semicolon to gtk-doc comment (737 bytes, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
committed Details | Review
libview: add missing transfer and element-type annotations (1.67 KB, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
committed Details | Review
ev-jobs: have ev_job_failed_from_error shadow ev_job_failed (930 bytes, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
committed Details | Review
ev-job-find: mark two methods as skip (1.40 KB, patch)
2013-01-08 17:39 UTC, Cosimo Cecchi
committed Details | Review
ev-document-factory: make EvTypeInfo a boxed type (2.63 KB, patch)
2013-01-28 22:45 UTC, Cosimo Cecchi
rejected Details | Review
ev-document: mark ev_document_synctex_forward_search() as skip (804 bytes, patch)
2013-01-28 22:45 UTC, Cosimo Cecchi
none Details | Review
ev-document: mark deprecated get_mutex() methods as (skip) (1.98 KB, patch)
2013-01-28 22:46 UTC, Cosimo Cecchi
none Details | Review

Description Cosimo Cecchi 2013-01-08 17:39:05 UTC
I wrote this patchset to remove introspection warnings when building Evince, and increase compatibility when libevdocument and libevview are used through GObject-introspection.
Most of these patches are trivial; feedback welcome.
Comment 1 Cosimo Cecchi 2013-01-08 17:39:08 UTC
Created attachment 232985 [details] [review]
Mark un-namespaced define as private
Comment 2 Cosimo Cecchi 2013-01-08 17:39:10 UTC
Created attachment 232986 [details] [review]
ev-file-helpers: use correct syntax for gtk-doc comment

If it's a gtk-doc comment, it must start with the name of the function,
or the parser will complain.
Comment 3 Cosimo Cecchi 2013-01-08 17:39:12 UTC
Created attachment 232987 [details] [review]
ev-document: use right parameters name in gtk-doc comment
Comment 4 Cosimo Cecchi 2013-01-08 17:39:15 UTC
Created attachment 232988 [details] [review]
ev-annotation: use correct variable names in function prototype
Comment 5 Cosimo Cecchi 2013-01-08 17:39:18 UTC
Created attachment 232989 [details] [review]
ev-file-helpers: use same parameter name between header and function
Comment 6 Cosimo Cecchi 2013-01-08 17:39:20 UTC
Created attachment 232990 [details] [review]
libdocument: add missing transfer and element-type annotations
Comment 7 Cosimo Cecchi 2013-01-08 17:39:23 UTC
Created attachment 232991 [details] [review]
ev-mapping-list: make a boxed type

And fix a number of introspection warnings.
Comment 8 Cosimo Cecchi 2013-01-08 17:39:25 UTC
Created attachment 232992 [details] [review]
ev-document-factory: make EvTypeInfo a boxed type

Fix a number of introspection warnings
Comment 9 Cosimo Cecchi 2013-01-08 17:39:28 UTC
Created attachment 232993 [details] [review]
ev-document: remove non-existant methods
Comment 10 Cosimo Cecchi 2013-01-08 17:39:30 UTC
Created attachment 232994 [details] [review]
ev-document: mark ev_document_synctex_forward_search() as skip

It returns an EvMapping, which can't be introspected.
Comment 11 Cosimo Cecchi 2013-01-08 17:39:33 UTC
Created attachment 232995 [details] [review]
ev-view: add missing semicolon to gtk-doc comment

g-ir-scanner will emit a warning otherwise.
Comment 12 Cosimo Cecchi 2013-01-08 17:39:36 UTC
Created attachment 232996 [details] [review]
libview: add missing transfer and element-type annotations
Comment 13 Cosimo Cecchi 2013-01-08 17:39:39 UTC
Created attachment 232997 [details] [review]
ev-jobs: have ev_job_failed_from_error shadow ev_job_failed

Since the latter uses varargs and will never be introspectable.
Comment 14 Cosimo Cecchi 2013-01-08 17:39:42 UTC
Created attachment 232998 [details] [review]
ev-job-find: mark two methods as skip

Methods that use a double pointer to a GList cannot be annotated
properly, so skip them until we have a better introspectable API.
Comment 15 Carlos Garcia Campos 2013-01-09 14:33:59 UTC
Review of attachment 232985 [details] [review]:

Thanks
Comment 16 Carlos Garcia Campos 2013-01-09 14:35:10 UTC
Review of attachment 232986 [details] [review]:

Right!
Comment 17 Carlos Garcia Campos 2013-01-09 14:36:00 UTC
Review of attachment 232987 [details] [review]:

Ok
Comment 18 Carlos Garcia Campos 2013-01-09 14:36:52 UTC
Review of attachment 232988 [details] [review]:

Oops
Comment 19 Carlos Garcia Campos 2013-01-09 14:40:38 UTC
Review of attachment 232989 [details] [review]:

::: libdocument/ev-file-helpers.h
@@ +47,2 @@
                                        GError           **error);
+gchar       *ev_mkdtemp               (const char        *tmpl,

Why not simply rename it to template so that you don't need to change the c file? to avoid issues with template C++ keyword?
Comment 20 Carlos Garcia Campos 2013-01-09 14:46:05 UTC
Review of attachment 232993 [details] [review]:

Ok
Comment 21 Carlos Garcia Campos 2013-01-09 14:46:56 UTC
Review of attachment 232995 [details] [review]:

Ok
Comment 22 Cosimo Cecchi 2013-01-14 16:40:05 UTC
Attachment 232985 [details] pushed as 00c4a35 - Mark un-namespaced define as private
Attachment 232986 [details] pushed as bc66ce2 - ev-file-helpers: use correct syntax for gtk-doc comment
Attachment 232987 [details] pushed as 376852b - ev-document: use right parameters name in gtk-doc comment
Attachment 232988 [details] pushed as 87ca31d - ev-annotation: use correct variable names in function prototype
Attachment 232989 [details] pushed as d37cbf3 - ev-file-helpers: use same parameter name between header and function
Attachment 232995 [details] pushed as 8ee8b7e - ev-view: add missing semicolon to gtk-doc comment
Comment 23 Cosimo Cecchi 2013-01-14 16:41:32 UTC
(In reply to comment #19)

> Why not simply rename it to template so that you don't need to change the c
> file? to avoid issues with template C++ keyword?

Yeah; looking at the git log it was previously changed from "template" to "the_template" for exactly that reason.
Comment 24 Cosimo Cecchi 2013-01-14 16:43:19 UTC
I didn't push attachment 232993 [details] [review] because on second thought those declarations might be there only to keep API compatibility, in which case we should mark them as "skip".

Review appreciated on the other patches.
Comment 25 William Jon McCann 2013-01-18 09:17:31 UTC
*** Bug 691214 has been marked as a duplicate of this bug. ***
Comment 26 William Jon McCann 2013-01-18 09:30:12 UTC
Unfortunately, Documents is currently broken without "libdocument: add missing transfer and element-type annotations"
Comment 27 William Jon McCann 2013-01-25 22:40:34 UTC
Carlos, are there any issues with this patch? We really need to get this fixed.
Comment 28 Carlos Garcia Campos 2013-01-28 14:23:55 UTC
Review of attachment 232990 [details] [review]:

Ok, let's push this to make sure introspection works, I'll try to find time to review and add the missing documentation. Thanks
Comment 29 Carlos Garcia Campos 2013-01-28 14:25:12 UTC
Review of attachment 232991 [details] [review]:

It makes sense, note that new methods have been added to EvMappingList. Sorry for the delay to review this :-(
Comment 30 Carlos Garcia Campos 2013-01-28 14:27:02 UTC
Review of attachment 232996 [details] [review]:

Thanks.
Comment 31 Carlos Garcia Campos 2013-01-28 14:29:07 UTC
Review of attachment 232997 [details] [review]:

Ok
Comment 32 Carlos Garcia Campos 2013-01-28 14:30:41 UTC
Review of attachment 232998 [details] [review]:

Both methods are actually deprecated for that reason, IIRC.
Comment 33 Cosimo Cecchi 2013-01-28 22:32:21 UTC
Pushed these - keeping the bug open for the other minor fixes

Attachment 232990 [details] pushed as 7917b62 - libdocument: add missing transfer and element-type annotations
Attachment 232991 [details] pushed as d6f7e03 - ev-mapping-list: make a boxed type
Attachment 232996 [details] pushed as 4bc744c - libview: add missing transfer and element-type annotations
Attachment 232997 [details] pushed as 1d87fc5 - ev-jobs: have ev_job_failed_from_error shadow ev_job_failed
Attachment 232998 [details] pushed as 7d9c9de - ev-job-find: mark two methods as skip
Comment 34 Cosimo Cecchi 2013-01-28 22:45:23 UTC
Created attachment 234672 [details] [review]
ev-document-factory: make EvTypeInfo a boxed type

Fix a number of introspection warnings
Comment 35 Cosimo Cecchi 2013-01-28 22:45:45 UTC
Created attachment 234673 [details] [review]
ev-document: mark ev_document_synctex_forward_search() as skip

It returns an EvMapping, which can't be introspected.
Comment 36 Cosimo Cecchi 2013-01-28 22:46:00 UTC
Created attachment 234674 [details] [review]
ev-document: mark deprecated get_mutex() methods as (skip)

These methods do not seem to really exist, and their prototypes are
there only for compatibility. Mark them as skip.
Comment 37 José Aliste 2013-02-06 12:20:13 UTC
Cosimo, do you have an idea of which struct we can have to replace EvMapping so it can be introspected?
Comment 38 Cosimo Cecchi 2013-02-06 17:48:25 UTC
As far as I recall the problem is the "gpointer data;" field in the struct, as it can be anything, and the binding has no way to know.

One possible way to solve this might be having different type-specific EvMapping substructures, or maybe wrap the data in a GValue instead.
Comment 39 Christian Persch 2013-06-09 21:34:28 UTC
Comment on attachment 234672 [details] [review]
ev-document-factory: make EvTypeInfo a boxed type

This isn't right. If we need to expose this info, we should make EvBackendInfo public instead.
Comment 40 GNOME Infrastructure Team 2018-05-22 14:57:27 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/324.