Received: from eggs.gnu.org ([208.118.235.92]:55412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2fUW-0004aY-Lo for qemu-devel@nongnu.org; Wed, 29 Feb 2012 04:06:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2fUT-0002Xs-Nl for qemu-devel@nongnu.org; Wed, 29 Feb 2012 04:06:32 -0500 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:12411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2fUT-0002V6-25 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 04:06:29 -0500 Date: Wed, 29 Feb 2012 17:05:47 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7?= Message-ID: <20120229090547.GA80051@cs.nctu.edu.tw> References: <4F4DBD19.1040501@samsung.com> <4F4DCCEA.4090303@msgid.tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4F4DCCEA.4090303@msgid.tls.msk.ru> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] QOM: why "klass" used instead of "class" ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: qemu-devel@nongnu.org, Evgeny Voevodin , Dmitry Solodkiy On Wed, Feb 29, 2012 at 10:59:54AM +0400, Michael Tokarev wrote: > On 29.02.2012 09:52, Evgeny Voevodin wrote: > > include/qemu/object.h: > [] > > * void my_device_class_init(ObjectClass *klass, void *class_data) > > * { > > * DeviceClass *dc =3D DEVICE_CLASS(klass); > > * dc->reset =3D my_device_reset; > > * } > > * > >=20 > > Why to use "klass", not "class"? >=20 > Because in C++, "class" is a reserved word. It is quite typical idiom > to replace class with klass in (public) headers. I thought QEMU is written in C, right? Is there anything related to C++= ? Regards, chenwj --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj