From 35a01937813db75a62f65b48fd17e210bc3887f9 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 29 Mar 2011 22:52:17 +0200 Subject: [PATCH] Include in python modules to workaround Swig bug. * wrap/python/spot.i, wrap/python/buddy.i: Include because Swig 2.0.2 uses ptrdiff_t and does not do the include itself. In g++ most libstdc++ standard headers have been changed to no longer include as an implementation detail, so the difference shows. --- ChangeLog | 10 ++++++++++ wrap/python/buddy.i | 7 ++++++- wrap/python/spot.i | 6 ++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ab4def404..b072a5e1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2011-03-29 Alexandre Duret-Lutz + + Include in python modules to workaround Swig bug. + + * wrap/python/spot.i, wrap/python/buddy.i: Include + because Swig 2.0.2 uses ptrdiff_t and does not do the include + itself. In g++ most libstdc++ standard headers have been changed + to no longer include as an implementation detail, so + the difference shows. + 2011-03-20 Alexandre Duret-Lutz * THANKS: Add Michael Weber for his help on the DiVinE interface. diff --git a/wrap/python/buddy.i b/wrap/python/buddy.i index f9aee345e..1f44a5197 100644 --- a/wrap/python/buddy.i +++ b/wrap/python/buddy.i @@ -1,4 +1,4 @@ -// Copyright (C) 2010 Laboratoire de Recherche et Développement de l'EPITA. +// Copyright (C) 2010, 2011 Laboratoire de Recherche et Développement de l'EPITA. // Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6), // département Systèmes Répartis Coopératifs (SRC), Université Pierre // et Marie Curie. @@ -52,6 +52,11 @@ MODIFICATIONS. ========================================================================*/ +%{ + // Workaround for SWIG 2.0.2 using ptrdiff_t but not including cstddef. + // It matters with g++ 4.6. +#include +%} %module buddy diff --git a/wrap/python/spot.i b/wrap/python/spot.i index de4866e62..1513176ad 100644 --- a/wrap/python/spot.i +++ b/wrap/python/spot.i @@ -21,6 +21,12 @@ // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. +%{ + // Workaround for SWIG 2.0.2 using ptrdiff_t but not including cstddef. + // It matters with g++ 4.6. +#include +%} + %module(directors="1") spot %include "std_string.i" -- GitLab