From 912c8ba257f0c0b05b3d5916da203bc8566c83af Mon Sep 17 00:00:00 2001 From: nima Date: Wed, 29 Oct 2008 07:10:24 +0000 Subject: Recoded the new work from upstream into these (main) files. The options to dump the memory image onto file, and read back from it has not yet been worked in, but the underlying work has been completed. git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@83 abc39116-655e-4be6-ad55-d661dc543056 --- dmidecodemodule.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dmidecodemodule.c') diff --git a/dmidecodemodule.c b/dmidecodemodule.c index 57b499a..62d36c6 100644 --- a/dmidecodemodule.c +++ b/dmidecodemodule.c @@ -1,7 +1,7 @@ #include "dmidecodemodule.h" #include -static PyObject* dmidecode_get(PyObject *self, char* section) { +static PyObject* dmidecode_get(PyObject *self, const char* section) { //mtrace(); @@ -122,9 +122,9 @@ static PyObject* dmidecode_get_connector(PyObject *self, PyObject *args) { retur static PyObject* dmidecode_get_slot(PyObject *self, PyObject *args) { return dmidecode_get(self, "slot"); } static PyObject* dmidecode_get_type(PyObject *self, PyObject *args) { const char *s; - if(PyArg_ParseTuple(args, "s", &s)) { + if(PyArg_ParseTuple(args, "s", &s)) return dmidecode_get(self, s); - } + return Py_None; } PyMethodDef DMIDataMethods[] = { -- cgit