[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] QOM: why "klass" used instead of "class" ?
From: |
陳韋任 |
Subject: |
Re: [Qemu-devel] QOM: why "klass" used instead of "class" ? |
Date: |
Wed, 29 Feb 2012 17:05:47 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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++?
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
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