summaryrefslogtreecommitdiffstats
path: root/dmidecodemodule.c
diff options
context:
space:
mode:
authornima <nima@abc39116-655e-4be6-ad55-d661dc543056>2008-10-29 07:10:24 +0000
committernima <nima@abc39116-655e-4be6-ad55-d661dc543056>2008-10-29 07:10:24 +0000
commit912c8ba257f0c0b05b3d5916da203bc8566c83af (patch)
tree41949d273ca6c46bcae8495c6ad6dd17838c89ed /dmidecodemodule.c
parente308e170fc844c8b4454384873497f52f0d37ae7 (diff)
downloadpython-dmidecode-912c8ba257f0c0b05b3d5916da203bc8566c83af.tar.gz
python-dmidecode-912c8ba257f0c0b05b3d5916da203bc8566c83af.tar.xz
python-dmidecode-912c8ba257f0c0b05b3d5916da203bc8566c83af.zip
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
Diffstat (limited to 'dmidecodemodule.c')
-rw-r--r--dmidecodemodule.c6
1 files changed, 3 insertions, 3 deletions
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 <mcheck.h>
-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[] = {