mesa/program: Make prog_instruction.h and program.h safe to include from C++.
authorPaul Berry <stereotype441@gmail.com>
Wed, 20 Mar 2013 18:35:34 +0000 (11:35 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 23 Aug 2013 18:02:25 +0000 (11:02 -0700)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/program/prog_instruction.h
src/mesa/program/program.h

index be221819f151a9a01fda813604bbbbb0dcf956bf..b9604e50d92ea8f1c4a1c9841a603987d9cce61a 100644 (file)
@@ -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 */
index f28983894600ebbd3c3dc67140d03619657d06dd..34965ab991d58012f36b00920428323d6e37b4d1 100644 (file)
 #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 */