diff options
author | Paul Berry <[email protected]> | 2012-04-29 21:46:47 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2012-05-10 10:30:00 -0700 |
commit | f28a7d0e77ffbeb2a27bda132d4334b3649be3a2 (patch) | |
tree | d94d3cc86f70c1b5aad8ee35270101ba7dab9302 /src/mesa/drivers/dri/intel/intel_batchbuffer.h | |
parent | 434fc8bde41f07687ad8941ceba03c4b3e0e75bb (diff) |
intel: Work around differences between C and C++ scoping rules.
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++.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_batchbuffer.h')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_batchbuffer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.h b/src/mesa/drivers/dri/intel/intel_batchbuffer.h index 50d0d28f7a8..d2744e44ac2 100644 --- a/src/mesa/drivers/dri/intel/intel_batchbuffer.h +++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.h @@ -13,6 +13,8 @@ extern "C" { #define BATCH_RESERVED 16 +struct intel_batchbuffer; + void intel_batchbuffer_init(struct intel_context *intel); void intel_batchbuffer_reset(struct intel_context *intel); void intel_batchbuffer_free(struct intel_context *intel); |