[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Why QEMUClock is defined in qemu-timer.c?
From: |
Richard Yang |
Subject: |
Re: [Qemu-devel] Why QEMUClock is defined in qemu-timer.c? |
Date: |
Wed, 1 Feb 2012 09:33:45 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Jan 31, 2012 at 12:00:30PM +0200, Dmitry Zamaruev wrote:
>This is used in many places.
>Maybe to simulate 'private' variables and access methods like in C++.
>
>If you define structure in .c file then every function that works with
>this structure must reside in same file. And any other code to use
>structure must use access-functions (api) to alter it and not directly
>(compiler will issue error about incomplete type).
>This way you could change structure or internal data handling without
>affecting external code that relies on "stable api functions".
Thanks for your explanation.
I learned a lot.
--
Richard Yang
Help you, Help me