summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2009-06-04 10:18:16 +0200
committerDavid Sommerseth <davids@redhat.com>2009-06-04 10:18:16 +0200
commit5cd0472e1bc6a74f5011976e4b9fe31a0b84d938 (patch)
tree51f78d2a0553d772db48e6a4ac13606607e7073f /src
parent97ba1cbc0842897f5459a75ef1cd2ecbb3cab136 (diff)
downloadpython-dmidecode-5cd0472e1bc6a74f5011976e4b9fe31a0b84d938.tar.gz
python-dmidecode-5cd0472e1bc6a74f5011976e4b9fe31a0b84d938.tar.xz
python-dmidecode-5cd0472e1bc6a74f5011976e4b9fe31a0b84d938.zip
Moved options global_options to a more suitable place. Added a comment
Diffstat (limited to 'src')
-rw-r--r--src/dmidecodemodule.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dmidecodemodule.c b/src/dmidecodemodule.c
index e77384a..f9b0eb1 100644
--- a/src/dmidecodemodule.c
+++ b/src/dmidecodemodule.c
@@ -48,8 +48,6 @@
#include "dmixml.h"
#include <mcheck.h>
-options *global_options = NULL;
-
static void init(options *opt)
{
/* sanity check */
@@ -319,6 +317,10 @@ static PyObject *dmidecode_get(options *opt, const char *section)
}
+// This global variable should only be available for the "first-entry" functions
+// which is defined in PyMethodDef DMIDataMethods[].
+options *global_options = NULL;
+
static PyObject *dmidecode_get_bios(PyObject * self, PyObject * args)
{
return dmidecode_get(global_options, "bios");