diff options
author | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-10-31 11:15:19 +0000 |
---|---|---|
committer | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-10-31 11:15:19 +0000 |
commit | 6f7a8bbe18e60f6691e7a7c566e28b2a5eda7c94 (patch) | |
tree | 1601e6763e574af0b2413126b257343f48bc7d52 /dmidecodemodule.c | |
parent | 24f10bb094c9831f4133d488d0af90dc2a83590f (diff) | |
download | python-dmidecode-6f7a8bbe18e60f6691e7a7c566e28b2a5eda7c94.tar.gz python-dmidecode-6f7a8bbe18e60f6691e7a7c566e28b2a5eda7c94.tar.xz python-dmidecode-6f7a8bbe18e60f6691e7a7c566e28b2a5eda7c94.zip |
Cleanup.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@97 abc39116-655e-4be6-ad55-d661dc543056
Diffstat (limited to 'dmidecodemodule.c')
-rw-r--r-- | dmidecodemodule.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/dmidecodemodule.c b/dmidecodemodule.c index 75d4101..0eeabbb 100644 --- a/dmidecodemodule.c +++ b/dmidecodemodule.c @@ -65,7 +65,7 @@ u8 *parse_opt_type(u8 *p, const char *arg) { static PyObject* dmidecode_get(PyObject *self, const char* section) { - if(self == NULL) return NULL; + //if(self == NULL) return NULL; //mtrace(); @@ -85,12 +85,6 @@ static PyObject* dmidecode_get(PyObject *self, const char* section) { int efi; u8 *buf; - if(sizeof(u8)!=1 || sizeof(u16)!=2 || sizeof(u32)!=4 || '\0'!=0) { - fprintf(stderr, "%s: compiler incompatibility\n", "dmidecodemodule"); - //exit(255); - return NULL; - } - /* Set default option values */ opt.devmem = DEFAULT_MEM_DEV; opt.flags=0; @@ -194,13 +188,13 @@ static PyObject* dmidecode_dump(PyObject *self, PyObject *args) { return Py_Fals static PyObject* dmidecode_load(PyObject *self, PyObject *args) { return Py_False; } static PyObject* dmidecode_get_dev(PyObject *self, PyObject *null) { - if(self == NULL) return NULL; + //if(self == NULL) return NULL; if(opt.dumpfile != NULL) return opt.dumpfile; else return PyString_FromString(opt.devmem); } static PyObject* dmidecode_set_dev(PyObject *self, PyObject *arg) { - if(self == NULL) return NULL; + //if(self == NULL) return NULL; if(PyString_Check(arg)) { if(opt.dumpfile) { Py_DECREF(opt.dumpfile); } opt.dumpfile = arg; |