This commit is contained in:
Michael Davidsaver
2013-03-30 19:16:39 -04:00
parent f1cd3e4d2d
commit 04510671ad
3 changed files with 4 additions and 2 deletions

View File

@ -34,7 +34,6 @@ static PyObject* pyRecord_new(PyTypeObject *type, PyObject *args, PyObject *kws)
self = (pyRecord*)type->tp_alloc(type, 0); self = (pyRecord*)type->tp_alloc(type, 0);
if(self) { if(self) {
dbInitEntry(pdbbase, &self->entry); dbInitEntry(pdbbase, &self->entry);
self->ispyrec = isPyRecord(self->entry.precnode->precord);
} }
return (PyObject*)self; return (PyObject*)self;
} }
@ -49,6 +48,7 @@ static int pyRecord_Init(pyRecord *self, PyObject *args, PyObject *kws)
PyErr_SetString(PyExc_ValueError, "No record by this name"); PyErr_SetString(PyExc_ValueError, "No record by this name");
return -1; return -1;
} }
self->ispyrec = isPyRecord(self->entry.precnode->precord);
return 0; return 0;
} }

View File

@ -9,3 +9,4 @@ device(ao, INST_IO, pydevsupCom, "Python Device")
device(ai, INST_IO, pydevsupCom2, "Raw Python Device") device(ai, INST_IO, pydevsupCom2, "Raw Python Device")
device(ao, INST_IO, pydevsupCom2, "Raw Python Device") device(ao, INST_IO, pydevsupCom2, "Raw Python Device")
device(waveform, INST_IO, pydevsupCom, "Python Device")

View File

@ -61,6 +61,7 @@ def processLink(name, lstr):
Returns (callable, Record, "arg1 arg2") Returns (callable, Record, "arg1 arg2")
""" """
rec = getRecord(name) rec = getRecord(name)
modname, args = lstr.split(None,1) parts = lstr.split(None,1)
modname, args = parts[0], parts[1] if len(parts)>1 else None
mod = __import__(modname) mod = __import__(modname)
return rec, mod.build(rec, args) return rec, mod.build(rec, args)