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 556628 - IntrospectionSkip annotation
IntrospectionSkip annotation
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks: 554919
 
 
Reported: 2008-10-16 19:58 UTC by Colin Walters
Modified: 2015-02-07 16:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bug 556628 – (skip) annotation (3.91 KB, patch)
2009-03-28 14:11 UTC, Dan Winship
none Details | Review

Description Colin Walters 2008-10-16 19:58:37 UTC
For implementing --fail-unbindable (bug 554919), we need a way for C authors to annotate special C API so that it doesn't appear in introspection.  This dovetails with the Shadows: annotation patch (bug 556475).  

A better name other than "IntrospectionSkip" would be welcome, too.

The thought here is you'd say:

/** myobj_foo:
 * @obj: Object
 * @data: arbitrary C data pointer
 *
 * IntrospectionSkip:
 */
void
myobj_foo (MyObj *obj, void * data) {
  
}

/** myobj_foo_buf:
 * @obj: Object
 * @data: (array length=len): byte array
 * @len: length
 *
 * Shadows: myobj_foo
 */
void 
myobj_foo_buf(MyObj *obj, guchar *data, int len) {

}
Comment 1 Dan Winship 2009-03-28 14:11:04 UTC
Created attachment 131563 [details] [review]
Bug 556628 – (skip) annotation

Adds a (skip) option that can be added to the header of any doc comment
to cause that symbol to be skipped in the .gir output
Comment 2 Dan Winship 2009-03-28 14:14:54 UTC
I implemented this using the style of the (type bitfield) annotation from bug 573332. Eg:

/**
 * foo_skip_me: (skip)
 * @fs: a #FooSkippable
 *
 * Does something that's only interesting from C and should not be
 * exposed to language bindings.
 */

With the () syntax, it's more obvious that this is something to do with introspection, so it seemed like we could remove "introspection" from the name and still have it be clear, right?

Not sure if I actually implemented skipping at the best spot... one possible problem is that it doesn't do any dependency analysis, so you can end up outputting broken girs (eg, in the example above, if I'd marked the FooSkippable type as (skip), but didn't skip foo_skip_me()).
Comment 3 Colin Walters 2009-08-24 19:21:17 UTC
Looks great; pushed, thankns!
Comment 4 André Klapper 2015-02-07 16:47:36 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]