From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2cSu-0005QR-K8 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 00:52:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2cSr-000362-O3 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 00:52:40 -0500 Received: from plane.gmane.org ([80.91.229.3]:49513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2cSr-00035I-HH for qemu-devel@nongnu.org; Wed, 29 Feb 2012 00:52:37 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S2cSp-0007ls-Kc for qemu-devel@nongnu.org; Wed, 29 Feb 2012 06:52:35 +0100 Received: from 213.33.220.118 ([213.33.220.118]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 29 Feb 2012 06:52:35 +0100 Received: from e.voevodin by 213.33.220.118 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 29 Feb 2012 06:52:35 +0100 From: Evgeny Voevodin Date: Wed, 29 Feb 2012 09:52:25 +0400 Message-ID: <4F4DBD19.1040501@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] QOM: why "klass" used instead of "class" ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Dmitry Solodkiy include/qemu/object.h: * Once all of the parent classes have been initialized, #TypeInfo::class_init * is called to let the class being instantiated provide default initialize for * it's virtual functions. Here is how the above example might be modified * to introduce an overridden virtual function: * * * Overriding a virtual function * * #include "qdev.h" * * void my_device_class_init(ObjectClass *klass, void *class_data) * { * DeviceClass *dc = DEVICE_CLASS(klass); * dc->reset = my_device_reset; * } * Why to use "klass", not "class"? -- Kind regards, Evgeny Voevodin, Leading Software Engineer, ASWG, Moscow R&D center, Samsung Electronics e-mail: e.voevodin@samsung.com From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2dW4-0002LJ-0G for qemu-devel@nongnu.org; Wed, 29 Feb 2012 02:00:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2dW2-00062P-Az for qemu-devel@nongnu.org; Wed, 29 Feb 2012 01:59:59 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:41830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2dW2-00061d-3d for qemu-devel@nongnu.org; Wed, 29 Feb 2012 01:59:58 -0500 Message-ID: <4F4DCCEA.4090303@msgid.tls.msk.ru> Date: Wed, 29 Feb 2012 10:59:54 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <4F4DBD19.1040501@samsung.com> In-Reply-To: <4F4DBD19.1040501@samsung.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] QOM: why "klass" used instead of "class" ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Evgeny Voevodin Cc: qemu-devel@nongnu.org, Dmitry Solodkiy 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 = DEVICE_CLASS(klass); > * dc->reset = my_device_reset; > * } > * > > Why to use "klass", not "class"? Because in C++, "class" is a reserved word. It is quite typical idiom to replace class with klass in (public) headers. /mjt From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2fk7-0007Vl-KR for qemu-devel@nongnu.org; Wed, 29 Feb 2012 04:22:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2fjy-0006V7-Ct for qemu-devel@nongnu.org; Wed, 29 Feb 2012 04:22:39 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:14152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2fjy-0006Ud-7E for qemu-devel@nongnu.org; Wed, 29 Feb 2012 04:22:30 -0500 Received: from euspt2 (mailout1.w1.samsung.com [210.118.77.11]) by mailout1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0M0500LQ1E1CYB@mailout1.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 29 Feb 2012 09:22:24 +0000 (GMT) Received: from [106.109.9.191] by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M0500GIDE1ERN@spt2.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 29 Feb 2012 09:22:26 +0000 (GMT) Date: Wed, 29 Feb 2012 13:22:24 +0400 From: Evgeny Voevodin In-reply-to: <20120229090547.GA80051@cs.nctu.edu.tw> Message-id: <4F4DEE50.8090705@samsung.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=UTF-8 Content-transfer-encoding: QUOTED-PRINTABLE References: <4F4DBD19.1040501@samsung.com> <4F4DCCEA.4090303@msgid.tls.msk.ru> <20120229090547.GA80051@cs.nctu.edu.tw> Subject: Re: [Qemu-devel] QOM: why "klass" used instead of "class" ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?6Zmz6Z+L5Lu7?= Cc: Michael Tokarev , qemu-devel@nongnu.org, Dmitry Solodkiy On 29.02.2012 13:05, =E9=99=B3=E9=9F=8B=E4=BB=BB wrote: > 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_dat= a) >>> * { >>> * DeviceClass *dc =3D DEVICE_CLASS(klass); >>> * dc->reset =3D my_device_reset; >>> * } >>> * >>> >>> Why to use "klass", not "class"? >> Because in C++, "class" is a reserved word. It is quite typical i= diom >> to replace class with klass in (public) headers. > I thought QEMU is written in C, right? Actually, it is, but idiom... --=20 Kind regards, Evgeny Voevodin, Leading Software Engineer, ASWG, Moscow R&D center, Samsung Electronics e-mail: e.voevodin@samsung.com From mboxrd@z Thu Jan 1 00:00:00 1970 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S319k-0000nh-KQ for qemu-devel@nongnu.org; Thu, 01 Mar 2012 03:14:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S319M-0003OU-5H for qemu-devel@nongnu.org; Thu, 01 Mar 2012 03:14:32 -0500 Received: from cantor2.suse.de ([195.135.220.15]:51618 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S319L-0003Nv-VD for qemu-devel@nongnu.org; Thu, 01 Mar 2012 03:14:08 -0500 Message-ID: <4F4F2FCB.20605@suse.de> Date: Thu, 01 Mar 2012 09:14:03 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <4F4DBD19.1040501@samsung.com> <4F4DCCEA.4090303@msgid.tls.msk.ru> <20120229090547.GA80051@cs.nctu.edu.tw> In-Reply-To: <20120229090547.GA80051@cs.nctu.edu.tw> Content-Type: text/plain; charset=UTF-8 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: =?UTF-8?B?6Zmz6Z+L5Lu7?= Cc: Michael Tokarev , qemu-devel@nongnu.org, Evgeny Voevodin , Dmitry Solodkiy Am 29.02.2012 10:05, schrieb =E9=99=B3=E9=9F=8B=E4=BB=BB: > 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; >>> * } >>> * >>> >>> Why to use "klass", not "class"? >> >> Because in C++, "class" is a reserved word. It is quite typical idiom >> to replace class with klass in (public) headers. >=20 > I thought QEMU is written in C, right? Is there anything related to C= ++? A while back there was a patch that added a C++ audio backend, for instance. I didn't get around to cleaning the patch up yet though. Objective-C is used for the Cocoa frontend. At least our headers should work with such C-derived languages. clazz is another common alternative if you don't like klass. ;) Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S31Cs-0002JW-EN for qemu-devel@nongnu.org; Thu, 01 Mar 2012 03:18:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S31Cq-0005JS-41 for qemu-devel@nongnu.org; Thu, 01 Mar 2012 03:17:45 -0500 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:53959 helo=akado.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S31Cp-0005Gn-Sy for qemu-devel@nongnu.org; Thu, 01 Mar 2012 03:17:44 -0500 Date: Thu, 1 Mar 2012 12:17:35 +0400 (MSK) From: malc In-Reply-To: <4F4F2FCB.20605@suse.de> Message-ID: References: <4F4DBD19.1040501@samsung.com> <4F4DCCEA.4090303@msgid.tls.msk.ru> <20120229090547.GA80051@cs.nctu.edu.tw> <4F4F2FCB.20605@suse.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [Qemu-devel] QOM: why "klass" used instead of "class" ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: Evgeny Voevodin , Michael Tokarev , qemu-devel@nongnu.org, =?ISO-2022-JP?Q?=1B$BDDpjG$=1B=28J?= , Dmitry Solodkiy On Thu, 1 Mar 2012, Andreas F?rber wrote: > Am 29.02.2012 10:05, schrieb ???: > > 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 = DEVICE_CLASS(klass); > >>> * dc->reset = my_device_reset; > >>> * } > >>> * > >>> > >>> Why to use "klass", not "class"? > >> > >> 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++? > > A while back there was a patch that added a C++ audio backend, for > instance. I didn't get around to cleaning the patch up yet though. > The real reason, ofcourse, is that germans are taking over the world, nothing new here. > Objective-C is used for the Cocoa frontend. > > At least our headers should work with such C-derived languages. > > clazz is another common alternative if you don't like klass. ;) > -- mailto:av1474@comtv.ru From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S31N2-0005zk-4j for qemu-devel@nongnu.org; Thu, 01 Mar 2012 03:28:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S31Mx-0000p3-DF for qemu-devel@nongnu.org; Thu, 01 Mar 2012 03:28:15 -0500 Received: from cantor2.suse.de ([195.135.220.15]:52866 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S31Mx-0000oX-66 for qemu-devel@nongnu.org; Thu, 01 Mar 2012 03:28:11 -0500 Message-ID: <4F4F3318.7030808@suse.de> Date: Thu, 01 Mar 2012 09:28:08 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <4F4DBD19.1040501@samsung.com> <4F4DCCEA.4090303@msgid.tls.msk.ru> <20120229090547.GA80051@cs.nctu.edu.tw> <4F4F2FCB.20605@suse.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 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: malc Cc: Evgeny Voevodin , Michael Tokarev , qemu-devel@nongnu.org, =?UTF-8?B?6Zmz6Z+L5Lu7?= , Dmitry Solodkiy Am 01.03.2012 09:17, schrieb malc: > On Thu, 1 Mar 2012, Andreas F?rber wrote: >=20 >> Am 29.02.2012 10:05, schrieb ???: >>> 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; >>>>> * } >>>>> * >>>>> >>>>> Why to use "klass", not "class"? >>>> >>>> Because in C++, "class" is a reserved word. It is quite typical idi= om >>>> to replace class with klass in (public) headers. >>> >>> I thought QEMU is written in C, right? Is there anything related to= C++? >> >> A while back there was a patch that added a C++ audio backend, for >> instance. I didn't get around to cleaning the patch up yet though. >> >=20 > The real reason, ofcourse, is that germans are taking over the world, > nothing new here. Actually the Haiku patch was by a Swiss and Anthony is American I guess. In German it would be Klasse. ;) Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S31Oc-0006s1-88 for qemu-devel@nongnu.org; Thu, 01 Mar 2012 03:29:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S31Oa-0001MI-Hl for qemu-devel@nongnu.org; Thu, 01 Mar 2012 03:29:53 -0500 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:63670 helo=akado.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S31Oa-0001Lc-Aj for qemu-devel@nongnu.org; Thu, 01 Mar 2012 03:29:52 -0500 Date: Thu, 1 Mar 2012 12:29:49 +0400 (MSK) From: malc In-Reply-To: <4F4F3318.7030808@suse.de> Message-ID: References: <4F4DBD19.1040501@samsung.com> <4F4DCCEA.4090303@msgid.tls.msk.ru> <20120229090547.GA80051@cs.nctu.edu.tw> <4F4F2FCB.20605@suse.de> <4F4F3318.7030808@suse.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [Qemu-devel] QOM: why "klass" used instead of "class" ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: Evgeny Voevodin , Michael Tokarev , qemu-devel@nongnu.org, =?ISO-2022-JP?Q?=1B$BDDpjG$=1B=28J?= , Dmitry Solodkiy On Thu, 1 Mar 2012, Andreas F?rber wrote: > Am 01.03.2012 09:17, schrieb malc: > > On Thu, 1 Mar 2012, Andreas F?rber wrote: > > > >> Am 29.02.2012 10:05, schrieb ???: > >>> 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 = DEVICE_CLASS(klass); > >>>>> * dc->reset = my_device_reset; > >>>>> * } > >>>>> * > >>>>> > >>>>> Why to use "klass", not "class"? > >>>> > >>>> 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++? > >> > >> A while back there was a patch that added a C++ audio backend, for > >> instance. I didn't get around to cleaning the patch up yet though. > >> > > > > The real reason, ofcourse, is that germans are taking over the world, > > nothing new here. > > Actually the Haiku patch was by a Swiss and Anthony is American I guess. > > In German it would be Klasse. ;) Ich weiss das >B) -- mailto:av1474@comtv.ru