mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 7.4.1154
Problem: No support for JSON. Solution: Add jsonencode() and jsondecode(). Also add v:false, v:true, v:null and v:none.
This commit is contained in:
@@ -810,6 +810,25 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookup_dict)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (our_tv->v_type == VAR_SPECIAL)
|
||||
{
|
||||
if (our_tv->vval.v_number == VVAL_FALSE)
|
||||
{
|
||||
ret = Py_False;
|
||||
Py_INCREF(ret);
|
||||
}
|
||||
else if (our_tv->vval.v_number == VVAL_TRUE)
|
||||
{
|
||||
ret = Py_True;
|
||||
Py_INCREF(ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
ret = Py_None;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
|
Reference in New Issue
Block a user