changeset 691:883dbf45afc9

Fixed a bug that caused the generated SWIG interface file for fife to not compile when building with gcc 4.6.1 fixes[t:546]
author vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
date Wed, 08 Jun 2011 03:03:50 +0000
parents 9dce3dbd4fa9
children be625cdff350
files engine/swigwrappers/python/fife.i.templ
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/engine/swigwrappers/python/fife.i.templ	Tue Apr 19 16:13:37 2011 +0000
+++ b/engine/swigwrappers/python/fife.i.templ	Wed Jun 08 03:03:50 2011 +0000
@@ -1,3 +1,14 @@
+%{
+/**
+ * This is a workaround for a minor swig bug when building on gcc 4.6.1 and above.
+ * Prior to gcc 4.6.1 the STL headers like vector, string, etc. used to 
+ * automatically pull in the cstddef header but starting with gcc 4.6.1 they no
+ * longer do. This leads to swig generated a file that does not compile so we
+ * explicitly include cstddef so the swig generated file will compile.
+ */
+#include <cstddef>
+%}
+
 %module(directors="1") fife
 %include "std_string.i"
 %include "std_vector.i"