include/isl_int.h: argument of mp_get_memory_functions should have C linkage
authorSven Verdoolaege <verdoolaege@gamma.math.uni-magdeburg.de>
Sun, 7 Feb 2010 11:05:21 +0000 (12:05 +0100)
committerSven Verdoolaege <verdoolaege@gamma.math.uni-magdeburg.de>
Sun, 7 Feb 2010 11:05:21 +0000 (12:05 +0100)
include/isl_int.h

index 5877adf..d4b3a38 100644 (file)
@@ -107,10 +107,12 @@ uint32_t isl_gmp_hash(mpz_t v, uint32_t hash);
 #endif
 
 #if defined(__cplusplus)
+extern "C" { typedef void (*isl_gmp_free_t)(void *, size_t); }
+
 static inline std::ostream &operator<<(std::ostream &os, isl_int i)
 {
        char *s;
-       void (*gmp_free)(void *, size_t);
+       isl_gmp_free_t gmp_free;
        s = mpz_get_str(0, 10, i);
        os << s;
        mp_get_memory_functions(NULL, NULL, &gmp_free);