[Mesa-dev] [PATCH 02/30] mesa/program: Make prog_instruction.h and program.h safe to include from C++.

Paul Berry stereotype441 at gmail.com
Tue Aug 20 11:30:17 PDT 2013


---
 src/mesa/program/prog_instruction.h | 8 ++++++++
 src/mesa/program/program.h          | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/src/mesa/program/prog_instruction.h b/src/mesa/program/prog_instruction.h
index be22181..b9604e5 100644
--- a/src/mesa/program/prog_instruction.h
+++ b/src/mesa/program/prog_instruction.h
@@ -386,6 +386,10 @@ struct prog_instruction
 };
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern void
 _mesa_init_instructions(struct prog_instruction *inst, GLuint count);
 
@@ -419,4 +423,8 @@ extern const char *
 _mesa_opcode_string(gl_inst_opcode opcode);
 
 
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
 #endif /* PROG_INSTRUCTION_H */
diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h
index f289838..34965ab 100644
--- a/src/mesa/program/program.h
+++ b/src/mesa/program/program.h
@@ -44,6 +44,10 @@
 #include "main/mtypes.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern struct gl_program _mesa_DummyProgram;
 
 
@@ -256,4 +260,8 @@ gl_geometry_program_const(const struct gl_program *prog)
 }
 
 
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
 #endif /* PROGRAM_H */
-- 
1.8.3.4



More information about the mesa-dev mailing list