[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: |
Michael Tokarev |
Subject: |
Re: [Qemu-devel] QOM: why "klass" used instead of "class" ? |
Date: |
Wed, 29 Feb 2012 10:59:54 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20120104 Icedove/8.0 |
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