Am 14.12.2011 17:34, schrieb malc:
On Wed, 14 Dec 2011, Anthony Liguori wrote:
GTK/glib uses a convenient of:
typedef struct _CamelCase CamelCase;
The reason that they use a separate struct name is that in C++, the struct
namespace not a separate namespace from the type namespace. This is actually a
reasonable policy for QEMU to adopt as we eventually start exporting C libraries
that may be consumed by C++ programs.
I think the use of _ does not violate the C specification as the struct
namespace is not the same as the type namespace which is what the C spec refers
to if I understand it correctly.
It does violate the standard _ followed by upper case letter is reserved
in all contexts.
sCamelCase instead of _CamelCase seems to work, too.