Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r2345:2595d6ad4cb4
Date: 2015-10-16 09:46 +0200
http://bitbucket.org/cffi/cffi/changeset/2595d6ad4cb4/

Log:    win64 fix

diff --git a/c/parse_c_type.c b/c/parse_c_type.c
--- a/c/parse_c_type.c
+++ b/c/parse_c_type.c
@@ -376,11 +376,14 @@
 
             case TOK_INTEGER:
                 errno = 0;
-#ifndef MS_WIN32
-                if (sizeof(length) > sizeof(unsigned long))
+                if (sizeof(length) > sizeof(unsigned long)) {
+#ifdef MS_WIN32     /* actually for win64 */
+                    length = _strtoui64(tok->p, &endptr, 0);
+#else
                     length = strtoull(tok->p, &endptr, 0);
+#endif
+                }
                 else
-#endif
                     length = strtoul(tok->p, &endptr, 0);
                 if (endptr != tok->p + tok->size)
                     return parse_error(tok, "invalid number");
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to