Imported Upstream version 3.2.0
[debian/amanda] / perl / Amanda / Application.c
index 91f2daf57d53aa1933f42f938a733591362d0725..c2d6a1dc06df04555f9655ea3ac4336a5305426a 100644 (file)
@@ -8,6 +8,9 @@
  * interface file instead. 
  * ----------------------------------------------------------------------------- */
 
+#include "../config/config.h"
+
+
 #define SWIGPERL
 #define SWIG_CASTRANK_MODE
 
@@ -1679,7 +1682,9 @@ XS(_wrap_run_calcsize_C) {
       num = av_len(tempav);
       for (i=0; i <= num; i++) {
         tv = av_fetch(tempav, i, 0);
-        level = g_slist_append(level, GINT_TO_POINTER(SvIV(*tv)));
+        /* (gint) cast is required because sizeof(IV) may not be sizeof(gint).
+                * Both will be >= 32 bits, though, and that's sufficient for a level. */
+        level = g_slist_append(level, GINT_TO_POINTER((gint)SvIV(*tv)));
       }
       arg5 = level;
     }