mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.3.954
Problem: No check if PyObject_IsTrue fails. Solution: Add a check for -1 value. (ZyX)
This commit is contained in:
parent
d5f729cada
commit
b983f75d22
@ -700,7 +700,10 @@ DictionarySetattr(PyObject *self, char *name, PyObject *val)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (PyObject_IsTrue(val))
|
int istrue = PyObject_IsTrue(val);
|
||||||
|
if (istrue == -1)
|
||||||
|
return -1;
|
||||||
|
else if (istrue)
|
||||||
this->dict->dv_lock = VAR_LOCKED;
|
this->dict->dv_lock = VAR_LOCKED;
|
||||||
else
|
else
|
||||||
this->dict->dv_lock = 0;
|
this->dict->dv_lock = 0;
|
||||||
@ -1201,7 +1204,10 @@ ListSetattr(PyObject *self, char *name, PyObject *val)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (PyObject_IsTrue(val))
|
int istrue = PyObject_IsTrue(val);
|
||||||
|
if (istrue == -1)
|
||||||
|
return -1;
|
||||||
|
else if (istrue)
|
||||||
this->list->lv_lock = VAR_LOCKED;
|
this->list->lv_lock = VAR_LOCKED;
|
||||||
else
|
else
|
||||||
this->list->lv_lock = 0;
|
this->list->lv_lock = 0;
|
||||||
@ -1479,7 +1485,10 @@ OptionsAssItem(OptionsObject *this, PyObject *keyObject, PyObject *valObject)
|
|||||||
|
|
||||||
if (flags & SOPT_BOOL)
|
if (flags & SOPT_BOOL)
|
||||||
{
|
{
|
||||||
r = set_option_value_for(key, PyObject_IsTrue(valObject), NULL,
|
int istrue = PyObject_IsTrue(valObject);
|
||||||
|
if (istrue == -1)
|
||||||
|
return -1;
|
||||||
|
r = set_option_value_for(key, istrue, NULL,
|
||||||
opt_flags, this->opt_type, this->from);
|
opt_flags, this->opt_type, this->from);
|
||||||
}
|
}
|
||||||
else if (flags & SOPT_NUM)
|
else if (flags & SOPT_NUM)
|
||||||
|
@ -728,6 +728,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
954,
|
||||||
/**/
|
/**/
|
||||||
953,
|
953,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user