From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK69U-00063y-Vj for qemu-devel@nongnu.org; Tue, 28 Jul 2015 10:46:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK69R-00086x-Er for qemu-devel@nongnu.org; Tue, 28 Jul 2015 10:46:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK69R-00086q-6u for qemu-devel@nongnu.org; Tue, 28 Jul 2015 10:46:41 -0400 References: <1435782155-31412-1-git-send-email-armbru@redhat.com> <1435782155-31412-28-git-send-email-armbru@redhat.com> <55B01923.9050907@redhat.com> <87y4i1sd0u.fsf@blackfin.pond.sub.org> <55B68002.90400@redhat.com> <878ua0pywu.fsf@blackfin.pond.sub.org> From: Eric Blake Message-ID: <55B795C9.7060108@redhat.com> Date: Tue, 28 Jul 2015 08:46:33 -0600 MIME-Version: 1.0 In-Reply-To: <878ua0pywu.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="66uO5v6t2OLrHpXiR6awIjFeWgM4V57d6" Subject: Re: [Qemu-devel] [PATCH RFC v2 27/47] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, berto@igalia.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --66uO5v6t2OLrHpXiR6awIjFeWgM4V57d6 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/28/2015 12:41 AM, Markus Armbruster wrote: >> Like reserving ourselves a namespace based on single _ for internal us= e. >> We practically already have that - all user names either start with a= >> letter or double underscore, so we could use single (and triple) >> underscore for internally-generated purposes, freeing up 'base', >> '*Kind', '*_MAX', and other namespace abuses back to the user. Well, = we >> may also need to reserve mid-name double-underscore (that is, the user= >> can only supply double underscore at the beginning, but not middle, of= >> an identifier). Ah well, food for thought for later patches. >=20 > Another concern: we should take care not to generate reserved > identifiers. And we do that for a number of identifiers already, by renaming 'default' in qapi to 'q_default' in C. >=20 > * Potential issue with your proposal: identifiers that begin with an > underscore and either an uppercase letter or another underscore are > always reserved for any use. True, so only underscore and lower is guaranteed safe. But in practice, we can often get away with more... >=20 > * Existing issue: downstream extensions carry a __RFQDN_ prefix in the > schema, which map to reserved C identifiers. =2E..the whole point of the __RFQDN_ prefix was that it is very unlikely to conflict with any vendor extensions (unless you happen to be the same vendor that writes the compiler and als use __RFQDN_ as part of your compiler implementation). Yes, it's risky, but a risk that hasn't hurt any downstream clients yet :) It's one of those things where if someone reports an actual problem in their environment, we'll fix it; but until then, it's not worth the headache of strict compliance to "fix" something that happens to work in spite of being undefined behavior. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --66uO5v6t2OLrHpXiR6awIjFeWgM4V57d6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVt5XOAAoJEKeha0olJ0Nq8DoH/2WgsXuhLAO5f5QeHn16LYyA OEv6bKS6aw8AlyWe2K6VU11cdzHrMqINukaePd3oMnuciCbKUJEeWeIBNQlqF9CE n4whFWTNrCZi3lXmF8kCP0bCWMqXrzhIfv4TGqUzoxzOxUDOhVvMNSGCApnBzcjs ESQ4OiIPGOzh2/Y4qPfngxx+wDRwticSjkLjUTlFGEc6sxH7sOt3Cqmj+mBMgw1G jLbUT8TJaDweDulNiYeoiziyE0DeY92hTslYD4CksHE1kEFqWJaKEFaUobKD93fW ISB2EK4tTaYxxUSd5K5uYSszrXL2KV/v1qLx5eAalAtdBw6y/OXA+d7a6URyoS4= =jX6N -----END PGP SIGNATURE----- --66uO5v6t2OLrHpXiR6awIjFeWgM4V57d6--