Skip to content

Commit

Permalink
updated for version 7.3.1239
Browse files Browse the repository at this point in the history
Problem:    Can't build with Python and MSVC10.
Solution:   Move #if outside of macro. (Taro Muraoka)
  • Loading branch information
brammool committed Jun 24, 2013
1 parent d5e376e commit c1c3d68
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ src/Obj*/pathdef.c
gvimext.dll
gvimext.lib

# Mac OSX
src/xxd/xxd.dSYM

# All platforms
*.rej
*.orig
Expand Down
20 changes: 12 additions & 8 deletions src/if_py_both.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,15 @@ StringToChars(PyObject *obj, PyObject **todecref)
}
else
{
PyErr_FORMAT(PyExc_TypeError,
#if PY_MAJOR_VERSION < 3
N_("expected str() or unicode() instance, but got %s")
PyErr_FORMAT(PyExc_TypeError,
N_("expected str() or unicode() instance, but got %s"),
Py_TYPE_NAME(obj));
#else
N_("expected bytes() or str() instance, but got %s")
PyErr_FORMAT(PyExc_TypeError,
N_("expected bytes() or str() instance, but got %s"),
Py_TYPE_NAME(obj));
#endif
, Py_TYPE_NAME(obj));
return NULL;
}

Expand Down Expand Up @@ -191,15 +193,17 @@ NumberToLong(PyObject *obj, long *result, int flags)
}
else
{
PyErr_FORMAT(PyExc_TypeError,
#if PY_MAJOR_VERSION < 3
PyErr_FORMAT(PyExc_TypeError,
N_("expected int(), long() or something supporting "
"coercing to long(), but got %s")
"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")
"but got %s"),
Py_TYPE_NAME(obj));
#endif
, Py_TYPE_NAME(obj));
return -1;
}

Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1239,
/**/
1238,
/**/
Expand Down

0 comments on commit c1c3d68

Please sign in to comment.