Thinking of glib's GObject (and) Introspection API

Milan Crha mcrha at redhat.com
Thu May 5 07:58:46 PDT 2016


On Wed, 2016-05-04 at 13:43 -0400, Allen Winter wrote:
> Milan, Miao: could see about all the warnings and errors reported at 
> https://travis-ci.org/libical/libical/jobs/127852561

	Hi,
I was poking the log and when you expand the "before_install" link at
the top-right side, then there is written:

| ==> Installing dependencies for gtk-doc: docbook, docbook-xsl, libxml2
| ==> Installing gtk-doc dependency: docbook
| ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/docbook-5.0
| ######################################################################## 100.0%
| ==> Pouring docbook-5.0.mavericks.bottle.tar.gz
| ==> Caveats
| To use the DocBook package in your XML toolchain,
| you need to add the following to your ~/.bashrc:
| export XML_CATALOG_FILES="/usr/local/etc/xml/catalog"

Thus it might be it, just add to your trevis script (or somewhere to
the CMake files) the above export and everything should work fine.

I also wanted to look on the compiler warnings, but my gcc (also 6.0)
doesn't have those extra warnings. Maybe it's some sort of an
"extension" in the clang? In any case, I think they are harmless, all
spotted in the generated code.

Most of them might be fixable by not repeating the type definition in
the libical-glib-private.h, but include the corresponding header where
that particular type is registered. Eventually, write types in the
private header as
+   struct _ICalType;
and reference it in the function arguments as
+   void some_function (struct _ICalType *tp);
instead of
-   typedef struct _ICalType ICalType;
-   void some_function (ICalType *tp);

I do not know how easily it might be doable in the source generator,
though, that's a question for Miao.

The other set of warnings related to enum conversion, either the
generator should create two functions, one for the conversion from the
libical enum to libical-glib enum and the other for the conversion from
the libical-glib enum to the libical enum and using these where needed,
or a simple cast to the other enum should work, as those in
i-cal-enums.h are paired 1:1.

	Bye,
	Milan




More information about the libical-devel mailing list