mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
updated for version 7.3.1242
Problem: No failure when trying to use a number as a string. Solution: Give an error when StringToLine() is called with an instance of the wrong type. (Jun Takimoto)
This commit is contained in:
@@ -3556,6 +3556,19 @@ StringToLine(PyObject *obj)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
PyErr_FORMAT(PyExc_TypeError,
|
||||
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
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Error checking: String must not contain newlines, as we
|
||||
|
@@ -728,6 +728,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1242,
|
||||
/**/
|
||||
1241,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user