From 5cd0472e1bc6a74f5011976e4b9fe31a0b84d938 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Thu, 4 Jun 2009 10:18:16 +0200 Subject: Moved options global_options to a more suitable place. Added a comment --- src/dmidecodemodule.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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 -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"); -- cgit