[Spice-devel] [PATCH spice-gtk] Fix: remove dependency cycle
Christophe Fergeau
cfergeau at redhat.com
Mon Feb 16 02:23:54 PST 2015
Hey,
On Mon, Feb 16, 2015 at 10:46:19AM +0100, Javier Celaya wrote:
> El Lunes, 16 de febrero de 2015 10:34:17 Christophe Fergeau escribió:
> > Hey,
> >
> > On Wed, Feb 11, 2015 at 03:34:13PM +0100, Javier Celaya wrote:
> > > channel-port.h includes spice-client.h, that includes channel-webdav.h,
> > > that includes channel-port.h again. It's enough if channel-port.h
> > > includes spice-channel.h
> >
> > Is it causing actual issues? Most channel-*.h files include
> > spice-client.h, which in turn includes channel-*.h again.
> >
> > Christophe
>
> It is an issue only when I include channel-port.h alone in my source file.
> Including spice-client.h fixes the problem, but it includes a lot of things I
> do not need. So, it is just a little annoyance. If you think it is not
> important enough, just ignore this patch.
Ah ok, for the record the error message is:
In file included from /usr/include/spice-client-glib-2.0/spice-client.h:46:0,
from /usr/include/spice-client-glib-2.0/channel-port.h:22,
from ./port.c:1:
/usr/include/spice-client-glib-2.0/channel-webdav.h:44:5: error: unknown type name 'SpicePortChannel'
SpicePortChannel parent;
^
/usr/include/spice-client-glib-2.0/channel-webdav.h:58:5: error: unknown type name 'SpicePortChannelClass'
SpicePortChannelClass parent_class;
In the long run, we probably don't want to fight too hard to support single
header inclusion instead of spice-client.h. However, in this case, single
include of channel-*.h files work fine except for channel-port.h, and this is
easy enough to fix, so why not. ACK, though the commit log should have more
details (ie the compile error). I'll adjust that before pushing unless you object.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150216/ba26c8bd/attachment.sig>
More information about the Spice-devel
mailing list