mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.0.0491: no good reason to build without the float feature
Problem: No good reason to build without the float feature. Solution: Remove configure check for float and "#ifdef FEAT_FLOAT".
This commit is contained in:
@@ -761,7 +761,6 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookup_dict)
|
||||
sprintf(buf, "%ld", (long)our_tv->vval.v_number);
|
||||
ret = PyString_FromString((char *)buf);
|
||||
}
|
||||
#ifdef FEAT_FLOAT
|
||||
else if (our_tv->v_type == VAR_FLOAT)
|
||||
{
|
||||
char buf[NUMBUFLEN];
|
||||
@@ -769,7 +768,6 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookup_dict)
|
||||
sprintf(buf, "%f", our_tv->vval.v_float);
|
||||
ret = PyString_FromString((char *)buf);
|
||||
}
|
||||
#endif
|
||||
else if (our_tv->v_type == VAR_LIST)
|
||||
{
|
||||
list_T *list = our_tv->vval.v_list;
|
||||
@@ -6329,13 +6327,11 @@ _ConvertFromPyObject(PyObject *obj, typval_T *tv, PyObject *lookup_dict)
|
||||
}
|
||||
else if (PyDict_Check(obj))
|
||||
return convert_dl(obj, tv, pydict_to_tv, lookup_dict);
|
||||
#ifdef FEAT_FLOAT
|
||||
else if (PyFloat_Check(obj))
|
||||
{
|
||||
tv->v_type = VAR_FLOAT;
|
||||
tv->vval.v_float = (float_T) PyFloat_AsDouble(obj);
|
||||
}
|
||||
#endif
|
||||
else if (PyObject_HasAttrString(obj, "keys"))
|
||||
return convert_dl(obj, tv, pymap_to_tv, lookup_dict);
|
||||
// PyObject_GetIter can create built-in iterator for any sequence object
|
||||
@@ -6388,9 +6384,7 @@ ConvertToPyObject(typval_T *tv)
|
||||
case VAR_NUMBER:
|
||||
return PyLong_FromLong((long) tv->vval.v_number);
|
||||
case VAR_FLOAT:
|
||||
#ifdef FEAT_FLOAT
|
||||
return PyFloat_FromDouble((double) tv->vval.v_float);
|
||||
#endif
|
||||
case VAR_LIST:
|
||||
return NEW_LIST(tv->vval.v_list);
|
||||
case VAR_DICT:
|
||||
|
Reference in New Issue
Block a user