[Mesa-dev] [PATCH 03/11] glsl: do not wrap header inclusion in extern "C"
Emil Velikov
emil.l.velikov at gmail.com
Tue Nov 24 08:29:20 PST 2015
From: Emil Velikov <emil.velikov at collabora.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
src/glsl/blob.h | 4 ++--
src/glsl/nir/glsl_types.h | 9 ++++++---
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/glsl/blob.h b/src/glsl/blob.h
index ec903ec..7fd6e33 100644
--- a/src/glsl/blob.h
+++ b/src/glsl/blob.h
@@ -25,12 +25,12 @@
#ifndef BLOB_H
#define BLOB_H
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <stdint.h>
-
/* The blob functions implement a simple, low-level API for serializing and
* deserializing.
*
diff --git a/src/glsl/nir/glsl_types.h b/src/glsl/nir/glsl_types.h
index d8a999a..1dd28a6 100644
--- a/src/glsl/nir/glsl_types.h
+++ b/src/glsl/nir/glsl_types.h
@@ -30,6 +30,12 @@
#include <assert.h>
#ifdef __cplusplus
+#include "GL/gl.h"
+#include "util/ralloc.h"
+#include "main/mtypes.h" /* for gl_texture_index, C++'s enum rules are broken */
+#endif
+
+#ifdef __cplusplus
extern "C" {
#endif
@@ -110,9 +116,6 @@ enum {
};
#ifdef __cplusplus
-#include "GL/gl.h"
-#include "util/ralloc.h"
-#include "main/mtypes.h" /* for gl_texture_index, C++'s enum rules are broken */
struct glsl_type {
GLenum gl_type;
--
2.6.2
More information about the mesa-dev
mailing list