[Mesa-dev] [PATCH 02/10] intel: Work around differences between C and C++ scoping rules.

Kenneth Graunke kenneth at whitecape.org
Mon May 7 14:20:14 PDT 2012

On 05/02/2012 01:52 PM, Paul Berry wrote:
> In C++, if a struct is defined inside another struct, or its name is
> first seen inside a struct or function, the struct is nested inside
> the namespace of the struct or function it appears in.  In C, all
> structs are visible from toplevel.
> This patch explicitly moves the decalartions of intel_batchbuffer to
> toplevel, so that it does not get nested inside a namespace when
> header files are included from C++.
> ---
>   src/mesa/drivers/dri/intel/intel_batchbuffer.h |    2 +
>   src/mesa/drivers/dri/intel/intel_context.h     |   52 ++++++++++++-----------
>   2 files changed, 29 insertions(+), 25 deletions(-)

Splitting out this struct seems reasonable enough.

For this patch only:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

More information about the mesa-dev mailing list