Support building on Windows
[jansson.git] / src / pack_unpack.c
index 01838cf..39db9b8 100644 (file)
@@ -1,13 +1,13 @@
 /*
- * Copyright (c) 2009-2011 Petri Lehtinen <petri@digip.org>
- * Copyright (c) 2011 Graeme Smecher <graeme.smecher@mail.mcgill.ca>
+ * Copyright (c) 2009-2012 Petri Lehtinen <petri@digip.org>
+ * Copyright (c) 2011-2012 Graeme Smecher <graeme.smecher@mail.mcgill.ca>
  *
  * Jansson is free software; you can redistribute it and/or modify
  * it under the terms of the MIT license. See LICENSE for details.
  */
 
 #include <string.h>
-#include <jansson.h>
+#include "jansson.h"
 #include "jansson_private.h"
 #include "utf.h"
 
@@ -431,7 +431,7 @@ static int unpack(scanner_t *s, json_t *root, va_list *ap)
             if(!(s->flags & JSON_VALIDATE_ONLY)) {
                 int *target = va_arg(*ap, int*);
                 if(root)
-                    *target = json_integer_value(root);
+                    *target = (int)json_integer_value(root);
             }
 
             return 0;