summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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");