Created
June 24, 2013 01:36
-
-
Save sgur/5847241 to your computer and use it in GitHub Desktop.
msvc_cpp_build_error.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HG changeset patch | |
# Parent 4607612d49e69b4e748b23ce64a75c0d2b56e4ca | |
diff -r 4607612d49e6 -r 229abb12ec23 src/if_py_both.h | |
--- a/src/if_py_both.h Mon Jun 24 09:50:40 2013 +0900 | |
+++ b/src/if_py_both.h Mon Jun 24 10:07:44 2013 +0900 | |
@@ -139,13 +139,15 @@ | |
} | |
else | |
{ | |
+#if PY_MAJOR_VERSION < 3 | |
PyErr_FORMAT(PyExc_TypeError, | |
-#if PY_MAJOR_VERSION < 3 | |
N_("expected str() or unicode() instance, but got %s") | |
+ , Py_TYPE_NAME(obj)); | |
#else | |
+ PyErr_FORMAT(PyExc_TypeError, | |
N_("expected bytes() or str() instance, but got %s") | |
+ , Py_TYPE_NAME(obj)); | |
#endif | |
- , Py_TYPE_NAME(obj)); | |
return NULL; | |
} | |
@@ -191,15 +193,17 @@ | |
} | |
else | |
{ | |
+#if PY_MAJOR_VERSION < 3 | |
PyErr_FORMAT(PyExc_TypeError, | |
-#if PY_MAJOR_VERSION < 3 | |
N_("expected int(), long() or something supporting " | |
"coercing to long(), but got %s") | |
+ , Py_TYPE_NAME(obj)); | |
#else | |
+ PyErr_FORMAT(PyExc_TypeError, | |
N_("expected int() or something supporting coercing to int(), " | |
"but got %s") | |
+ , Py_TYPE_NAME(obj)); | |
#endif | |
- , Py_TYPE_NAME(obj)); | |
return -1; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment