Skip to content

Commit 3584f8a

Browse files
committed
Fix review suggestions
1 parent 6c4a510 commit 3584f8a

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build-system]
22
requires = ["setuptools", "wheel", "setuptools_dso", "epicscorelibs>=7.0.4.99.0.0a1"]
3-
build-backend = "setuptools.build_meta"
3+
build-backend = "setuptools.build_meta"

‎softioc/extension.c‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,11 @@ static PyObject *db_put_field(PyObject *self, PyObject *args)
105105
return NULL;
106106

107107
struct dbAddr dbAddr;
108-
int rc = dbNameToAddr(name, &dbAddr);
109-
if (rc == 0)
110-
rc = dbPutField(&dbAddr, dbrType, pbuffer, length);
111-
return Py_BuildValue("i", rc);
108+
if (dbNameToAddr(name, &dbAddr))
109+
return PyErr_Format(PyExc_RuntimeError, "dbNameToAddr failed for %s", name);
110+
if (dbPutField(&dbAddr, dbrType, pbuffer, length))
111+
return PyErr_Format(PyExc_RuntimeError, "dbPutField failed for %s", name);
112+
Py_RETURN_NONE;
112113
}
113114

114115

@@ -253,4 +254,4 @@ PyMOD(_extension)
253254
#else
254255
(void)mod;
255256
#endif
256-
}
257+
}

0 commit comments

Comments
 (0)