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