msvc_cpp_build_error.patch
# 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;
}