fix name
This commit is contained in:
@ -85,13 +85,13 @@ static long detach_common(dbCommon *prec)
|
|||||||
static long process_common(dbCommon *prec)
|
static long process_common(dbCommon *prec)
|
||||||
{
|
{
|
||||||
pyDevice *priv = prec->dpvt;
|
pyDevice *priv = prec->dpvt;
|
||||||
PyObject *cause = priv->reason;
|
PyObject *reason = priv->reason;
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
if(!cause)
|
if(!reason)
|
||||||
cause = Py_None;
|
reason = Py_None;
|
||||||
|
|
||||||
ret = PyObject_CallMethod(priv->support, "process", "OO", priv->pyrecord, cause);
|
ret = PyObject_CallMethod(priv->support, "process", "OO", priv->pyrecord, reason);
|
||||||
if(!ret)
|
if(!ret)
|
||||||
return -1;
|
return -1;
|
||||||
Py_DECREF(ret);
|
Py_DECREF(ret);
|
||||||
@ -236,7 +236,7 @@ static long process_record(dbCommon *prec)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int setCausePyRecord(dbCommon *prec, PyObject *reason)
|
int setReasonPyRecord(dbCommon *prec, PyObject *reason)
|
||||||
{
|
{
|
||||||
pyDevice *priv=prec->dpvt;
|
pyDevice *priv=prec->dpvt;
|
||||||
if(!isPyRecord(prec) || !priv || priv->reason)
|
if(!isPyRecord(prec) || !priv || priv->reason)
|
||||||
@ -246,7 +246,7 @@ int setCausePyRecord(dbCommon *prec, PyObject *reason)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int clearCausePyRecord(dbCommon *prec)
|
int clearReasonPyRecord(dbCommon *prec)
|
||||||
{
|
{
|
||||||
pyDevice *priv=prec->dpvt;
|
pyDevice *priv=prec->dpvt;
|
||||||
if(!isPyRecord(prec) || !priv || !priv->reason)
|
if(!isPyRecord(prec) || !priv || !priv->reason)
|
||||||
|
@ -137,7 +137,7 @@ static PyObject* pyRecord_scan(pyRecord *self, PyObject *args, PyObject *kws)
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
long ret;
|
long ret;
|
||||||
setCausePyRecord(prec, reason);
|
setReasonPyRecord(prec, reason);
|
||||||
|
|
||||||
Py_BEGIN_ALLOW_THREADS {
|
Py_BEGIN_ALLOW_THREADS {
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ static PyObject* pyRecord_scan(pyRecord *self, PyObject *args, PyObject *kws)
|
|||||||
|
|
||||||
} Py_END_ALLOW_THREADS
|
} Py_END_ALLOW_THREADS
|
||||||
|
|
||||||
clearCausePyRecord(prec);
|
clearReasonPyRecord(prec);
|
||||||
|
|
||||||
return PyLong_FromLong(ret);
|
return PyLong_FromLong(ret);
|
||||||
}
|
}
|
||||||
@ -183,7 +183,7 @@ static PyObject *pyRecord_asyncFinish(pyRecord *self, PyObject *args, PyObject *
|
|||||||
|
|
||||||
Py_INCREF(self);
|
Py_INCREF(self);
|
||||||
|
|
||||||
setCausePyRecord(prec, reason);
|
setReasonPyRecord(prec, reason);
|
||||||
|
|
||||||
Py_BEGIN_ALLOW_THREADS {
|
Py_BEGIN_ALLOW_THREADS {
|
||||||
rset *rsup = prec->rset;
|
rset *rsup = prec->rset;
|
||||||
@ -198,7 +198,7 @@ static PyObject *pyRecord_asyncFinish(pyRecord *self, PyObject *args, PyObject *
|
|||||||
|
|
||||||
} Py_END_ALLOW_THREADS
|
} Py_END_ALLOW_THREADS
|
||||||
|
|
||||||
clearCausePyRecord(prec);
|
clearReasonPyRecord(prec);
|
||||||
|
|
||||||
if(!pact) {
|
if(!pact) {
|
||||||
PyErr_SetString(PyExc_ValueError, "Python Device record was not active");
|
PyErr_SetString(PyExc_ValueError, "Python Device record was not active");
|
||||||
|
@ -9,7 +9,7 @@ int pyRecord_prepare(void);
|
|||||||
void pyRecord_setup(PyObject *module);
|
void pyRecord_setup(PyObject *module);
|
||||||
|
|
||||||
int isPyRecord(dbCommon *);
|
int isPyRecord(dbCommon *);
|
||||||
int setCausePyRecord(dbCommon *, PyObject *);
|
int setReasonPyRecord(dbCommon *, PyObject *);
|
||||||
int clearCausePyRecord(dbCommon *);
|
int clearReasonPyRecord(dbCommon *);
|
||||||
|
|
||||||
#endif // PYDEVSUP_H
|
#endif // PYDEVSUP_H
|
||||||
|
Reference in New Issue
Block a user