This commit is contained in:
Michael Davidsaver
2013-03-30 15:49:21 -04:00
parent 67fe8ad82f
commit e994a5d87b
3 changed files with 12 additions and 12 deletions

View File

@ -85,13 +85,13 @@ static long detach_common(dbCommon *prec)
static long process_common(dbCommon *prec)
{
pyDevice *priv = prec->dpvt;
PyObject *cause = priv->reason;
PyObject *reason = priv->reason;
PyObject *ret;
if(!cause)
cause = Py_None;
if(!reason)
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)
return -1;
Py_DECREF(ret);
@ -236,7 +236,7 @@ static long process_record(dbCommon *prec)
return 0;
}
int setCausePyRecord(dbCommon *prec, PyObject *reason)
int setReasonPyRecord(dbCommon *prec, PyObject *reason)
{
pyDevice *priv=prec->dpvt;
if(!isPyRecord(prec) || !priv || priv->reason)
@ -246,7 +246,7 @@ int setCausePyRecord(dbCommon *prec, PyObject *reason)
return 1;
}
int clearCausePyRecord(dbCommon *prec)
int clearReasonPyRecord(dbCommon *prec)
{
pyDevice *priv=prec->dpvt;
if(!isPyRecord(prec) || !priv || !priv->reason)

View File

@ -137,7 +137,7 @@ static PyObject* pyRecord_scan(pyRecord *self, PyObject *args, PyObject *kws)
} else {
long ret;
setCausePyRecord(prec, reason);
setReasonPyRecord(prec, reason);
Py_BEGIN_ALLOW_THREADS {
@ -147,7 +147,7 @@ static PyObject* pyRecord_scan(pyRecord *self, PyObject *args, PyObject *kws)
} Py_END_ALLOW_THREADS
clearCausePyRecord(prec);
clearReasonPyRecord(prec);
return PyLong_FromLong(ret);
}
@ -183,7 +183,7 @@ static PyObject *pyRecord_asyncFinish(pyRecord *self, PyObject *args, PyObject *
Py_INCREF(self);
setCausePyRecord(prec, reason);
setReasonPyRecord(prec, reason);
Py_BEGIN_ALLOW_THREADS {
rset *rsup = prec->rset;
@ -198,7 +198,7 @@ static PyObject *pyRecord_asyncFinish(pyRecord *self, PyObject *args, PyObject *
} Py_END_ALLOW_THREADS
clearCausePyRecord(prec);
clearReasonPyRecord(prec);
if(!pact) {
PyErr_SetString(PyExc_ValueError, "Python Device record was not active");

View File

@ -9,7 +9,7 @@ int pyRecord_prepare(void);
void pyRecord_setup(PyObject *module);
int isPyRecord(dbCommon *);
int setCausePyRecord(dbCommon *, PyObject *);
int clearCausePyRecord(dbCommon *);
int setReasonPyRecord(dbCommon *, PyObject *);
int clearReasonPyRecord(dbCommon *);
#endif // PYDEVSUP_H