0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.3.671

Problem:    More Python code can be shared between Python 2 and 3.
Solution:   Move code to if_py_both.h. (ZyX)
This commit is contained in:
Bram Moolenaar
2012-09-21 13:46:06 +02:00
parent 696c2116dc
commit 770456589e
4 changed files with 45 additions and 71 deletions

View File

@@ -951,31 +951,6 @@ OutputGetattr(PyObject *self, char *name)
return Py_FindMethod(OutputMethods, self, name);
}
static int
OutputSetattr(PyObject *self, char *name, PyObject *val)
{
if (val == NULL)
{
PyErr_SetString(PyExc_AttributeError, _("can't delete OutputObject attributes"));
return -1;
}
if (strcmp(name, "softspace") == 0)
{
if (!PyInt_Check(val))
{
PyErr_SetString(PyExc_TypeError, _("softspace must be an integer"));
return -1;
}
((OutputObject *)(self))->softspace = PyInt_AsLong(val);
return 0;
}
PyErr_SetString(PyExc_AttributeError, _("invalid attribute"));
return -1;
}
/***************/
static int