Received: from eggs.gnu.org ([208.118.235.92]:55076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TupI9-0007gn-Gc for qemu-devel@nongnu.org; Mon, 14 Jan 2013 14:01:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TupHw-0001om-Qr for qemu-devel@nongnu.org; Mon, 14 Jan 2013 14:01:53 -0500 From: Markus Armbruster References: <1358121304-21345-1-git-send-email-afaerber@suse.de> <1358121304-21345-2-git-send-email-afaerber@suse.de> <87k3rg2bzf.fsf@blackfin.pond.sub.org> <50F437C5.4020905@suse.de> Date: Mon, 14 Jan 2013 20:01:36 +0100 In-Reply-To: <50F437C5.4020905@suse.de> ("Andreas =?utf-8?Q?F=C3=A4rber=22?= =?utf-8?Q?'s?= message of "Mon, 14 Jan 2013 17:52:21 +0100") Message-ID: <87a9sboagf.fsf_-_@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Go along with glib's basic type typedef silliness? (was: [PATCH 01/10] qom: Make object_resolve_path_component() path argument const) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: qemu-trivial , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Anthony Liguori , agraf@suse.de [Thread hijack, dropping cc: qemu-trivial, qemu-ppc] Andreas F=C3=A4rber writes: > Am 14.01.2013 13:19, schrieb Markus Armbruster: >> Andreas F=C3=A4rber writes: [...] >>> diff --git a/qom/object.c b/qom/object.c >>> index 351b88c..03e6f24 100644 >>> --- a/qom/object.c >>> +++ b/qom/object.c >>> @@ -1017,7 +1017,7 @@ gchar *object_get_canonical_path(Object *obj) >>> return newpath; >>> } >>>=20=20 >>> -Object *object_resolve_path_component(Object *parent, gchar *part) >>> +Object *object_resolve_path_component(Object *parent, const gchar *par= t) >>> { >>> ObjectProperty *prop =3D object_property_find(parent, part, NULL); >>> if (prop =3D=3D NULL) { >>=20 >> Unrelated: do we really want to go along with glib's basic type typedef >> silliness? > > Elsewhere I have adopted the exact GLib signature since typedefs can be > changed at any time. In particular the GCompareFunc using gconstpointer, > gint, etc. Not saying I find their GLib usage useful. No, these typedefs cannot be changed. Firstly, their exact definitions are documented[*], therefore can be relied on. Secondly, mountains of code rely on the exact definitions, and would break left and right if they were changed. They're a textbook example of a perfectly useless pseudo-abstraction. [...] [*] http://developer.gnome.org/glib/stable/glib-Basic-Types.html