[pypy-commit] pypy default: fix test collection crash on msvc

mattip noreply at buildbot.pypy.org
Sun Apr 27 22:22:07 CEST 2014


Author: Matti Picus <matti.picus at gmail.com>
Branch: 
Changeset: r71031:83ace05284a9
Date: 2014-04-27 23:00 +0300
http://bitbucket.org/pypy/pypy/changeset/83ace05284a9/

Log:	fix test collection crash on msvc

diff --git a/pypy/module/cppyy/src/dummy_backend.cxx b/pypy/module/cppyy/src/dummy_backend.cxx
--- a/pypy/module/cppyy/src/dummy_backend.cxx
+++ b/pypy/module/cppyy/src/dummy_backend.cxx
@@ -521,6 +521,15 @@
 
 
 /* misc helpers ----------------------------------------------------------- */
+#if defined(_MSC_VER)
+long long cppyy_strtoll(const char* str) {
+    return _strtoi64(str, NULL, 0);
+}
+
+extern "C" unsigned long long cppyy_strtoull(const char* str) {
+    return _strtoui64(str, NULL, 0);
+}
+#else
 long long cppyy_strtoll(const char* str) {
     return strtoll(str, NULL, 0);
 }
@@ -528,6 +537,7 @@
 extern "C" unsigned long long cppyy_strtoull(const char* str) {
     return strtoull(str, NULL, 0);
 }
+#endif
 
 void cppyy_free(void* ptr) {
     free(ptr);


More information about the pypy-commit mailing list