From 3620e1e0139a5d645b1db801ea32db52123fabbd Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 3 Mar 2020 11:01:38 -0800 Subject: [PATCH] 3.14 compat --- devsupApp/src/dbapi.c | 12 +++++++++++- devsupApp/src/pydevsup.h | 10 ++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/devsupApp/src/dbapi.c b/devsupApp/src/dbapi.c index 2d5338b..2dab153 100644 --- a/devsupApp/src/dbapi.c +++ b/devsupApp/src/dbapi.c @@ -10,6 +10,8 @@ #include #include +#include +#include #include #include #include @@ -240,7 +242,15 @@ PyObject *py_iocInit(PyObject *unused, PyObject *args, PyObject *kws) isolate = PyObject_IsTrue(pyisolate); Py_BEGIN_ALLOW_THREADS { - ret = isolate ? iocBuildIsolated() : iocBuild(); + if(isolate) { +#if EPICS_VERSION_INT=3.15"); +#else + ret = iocBuildIsolated(); +#endif + } else { + ret = iocBuild(); + } if(!ret) ret = iocRun(); } Py_END_ALLOW_THREADS diff --git a/devsupApp/src/pydevsup.h b/devsupApp/src/pydevsup.h index a8810b1..abdd325 100644 --- a/devsupApp/src/pydevsup.h +++ b/devsupApp/src/pydevsup.h @@ -1,9 +1,19 @@ #ifndef PYDEVSUP_H #define PYDEVSUP_H +#include #include #include +#include + +#ifndef VERSION_INT +# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) +#endif +#ifndef EPICS_VERSION_INT +# define EPICS_VERSION_INT VERSION_INT(EPICS_VERSION, EPICS_REVISION, EPICS_MODIFICATION, EPICS_PATCH_LEVEL) +#endif + #if PY_MAJOR_VERSION >= 3 #define PyInt_FromLong PyLong_FromLong #define PyInt_AsLong PyLong_AsLong