From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avJuB-0003cG-GB for qemu-devel@nongnu.org; Wed, 27 Apr 2016 03:29:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avJu8-0004T7-AU for qemu-devel@nongnu.org; Wed, 27 Apr 2016 03:29:03 -0400 From: Markus Armbruster References: <1461119601-4936-1-git-send-email-david@gibson.dropbear.id.au> <1461119601-4936-2-git-send-email-david@gibson.dropbear.id.au> <571F4A36.7060106@redhat.com> <20160427060252.GB18476@voom.redhat.com> <87bn4v362f.fsf@dusky.pond.sub.org> <572064DF.6030802@redhat.com> Date: Wed, 27 Apr 2016 09:28:57 +0200 In-Reply-To: <572064DF.6030802@redhat.com> (Thomas Huth's message of "Wed, 27 Apr 2016 09:06:07 +0200") Message-ID: <87potbzf0m.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [RFC for-2.7 01/11] qdt: IEEE1275-style device tree utility code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: David Gibson , aik@ozlabs.ru, agraf@suse.de, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, crosthwaite.peter@gmail.com Thomas Huth writes: > On 27.04.2016 08:43, Markus Armbruster wrote: >> David Gibson writes: >> >>> On Tue, Apr 26, 2016 at 01:00:06PM +0200, Thomas Huth wrote: >>>> On 20.04.2016 04:33, David Gibson wrote: > [...] >>>>> +/* >>>>> + * Property functions >>>>> + */ >>>>> + >>>>> +QDTProperty *qdt_new_property(const gchar *name, gconstpointer val, gsize len) >>>>> +{ >>>>> + QDTProperty *prop = g_malloc0(sizeof(*prop) + len); >>>>> + >>>>> + prop->name = g_strdup(name); >>>>> + prop->len = len; >>>>> + memcpy(prop->val, val, len); >>>>> + return prop; >>>>> +} >>>>> + >>>>> +static QDTProperty *getprop_(const QDTNode *node, const gchar *name) >>>> >>>> Underscore at the end looks somewhat strange ... can't you simply drop that? >>> >>> Well.. the idea was that the _ versions are the "internal" ones, >>> whereas external users will generally use the non-underscore version >> >> I've seen that convention used before. It's fine with me. > > Can't remember to have seen that convention before ... I know that some > people use the underscore at the beginning to mark an internal function, > but at the end? > So if you really want to use the underscore, what about putting it at > the beginning instead? C99 7.1.3 Reserved identifiers: -- All identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces. [...]