Thinking of glib's GObject (and) Introspection API

Milan Crha mcrha at redhat.com
Tue Jun 14 01:15:47 PDT 2016


On Mon, 2016-06-13 at 17:15 -0400, Allen Winter wrote:
> I'm still seeing a lot of -Wtypedef-redefinition warnings with clang.
> See https://travis-ci.org/libical/libical/jobs/137352663

	Hi,
interesting, my clang has default standard higher than yours (or that
in travis), thus I didn't see those warnings here. I added -ansi to the
CFLAGS (which also introduced new warnings about "//" comment in the C
files elsewhere than in libical-glib), and I get those type
redefinition warnings too now.

The attached patch introduces a new i-cal-forward-declarations.h file
and uses it around the sources. It's generated in a similar way as the
other files in the libical-glib.

I chose this approach also to have nice type names in the public header
files, thus instead of:

   struct _ICalSomeType;
   ...
   void i_cal_function (..., struct _ICalSomeType *x, ...);

the type can be used directly (in the nice way):

   void i_cal_function (..., ICalSomeType *x, ...);

	Bye,
	Milan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Generate-i-cal-forward-declarations.h-and-use-it-in-.patch
Type: text/x-patch
Size: 13414 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libical-devel/attachments/20160614/9de4f49b/attachment.bin>


More information about the libical-devel mailing list