Add Python::has_minimum_version

This commit is contained in:
Richard Berger
2020-03-27 16:28:43 -04:00
parent 8b75fb2950
commit 3b1244831e
5 changed files with 25 additions and 11 deletions

View File

@ -535,3 +535,10 @@ void PythonImpl::deallocate(int i)
delete [] pfuncs[i].ovarname;
delete [] pfuncs[i].longstr;
}
/* ------------------------------------------------------------------ */
bool PythonImpl::has_minimum_version(int major, int minor)
{
return (PY_MAJOR_VERSION == major && PY_MINOR_VERSION >= minor) || (PY_MAJOR_VERSION > major);
}