From: Jason Ekstrand Date: Wed, 29 Apr 2015 21:48:12 +0000 (-0700) Subject: glsl/types: Expose the function_param and struct_field structs to C X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=53bff3e445b7c9697d7cfbbcd2207b21bbc6e08a;p=mesa.git glsl/types: Expose the function_param and struct_field structs to C Previously, they were hidden behind a #ifdef __cplusplus so C wouldn't find them. This commit simpliy moves the #ifdef and adds #ifdef's around constructors. --- diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h index daa809e3bae..0a8a0b97dc9 100644 --- a/src/glsl/glsl_types.h +++ b/src/glsl/glsl_types.h @@ -749,6 +749,10 @@ private: /*@}*/ }; +#undef DECL_TYPE +#undef STRUCT_TYPE +#endif /* __cplusplus */ + struct glsl_struct_field { const struct glsl_type *type; const char *name; @@ -797,6 +801,7 @@ struct glsl_struct_field { */ int stream; +#ifdef __cplusplus glsl_struct_field(const struct glsl_type *_type, const char *_name) : type(_type), name(_name), location(-1), interpolation(0), centroid(0), sample(0), matrix_layout(GLSL_MATRIX_LAYOUT_INHERITED), patch(0), @@ -809,6 +814,7 @@ struct glsl_struct_field { { /* empty */ } +#endif }; struct glsl_function_param { @@ -824,8 +830,4 @@ glsl_align(unsigned int a, unsigned int align) return (a + align - 1) / align * align; } -#undef DECL_TYPE -#undef STRUCT_TYPE -#endif /* __cplusplus */ - #endif /* GLSL_TYPES_H */