From: Michael Tremer Date: Wed, 1 Dec 2021 19:40:00 +0000 (+0000) Subject: python: Make python types extern X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c237bbede488e4123f6d8cdeb19788766488bcd4;p=collecty.git python: Make python types extern Signed-off-by: Michael Tremer --- diff --git a/src/_collecty/_collectymodule.h b/src/_collecty/_collectymodule.h index 56282f1..bbbe8e2 100644 --- a/src/_collecty/_collectymodule.h +++ b/src/_collecty/_collectymodule.h @@ -40,7 +40,7 @@ typedef struct { SkDisk* disk; } BlockDevice; -PyTypeObject BlockDeviceType; +extern PyTypeObject BlockDeviceType; void BlockDevice_dealloc(BlockDevice* self); int BlockDevice_get_identity(BlockDevice* device); @@ -57,9 +57,9 @@ PyObject* BlockDevice_get_bad_sectors(PyObject* self); PyObject* BlockDevice_get_temperature(PyObject* self); /* ping */ -PyObject* PyExc_PingError; -PyObject* PyExc_PingAddHostError; -PyObject* PyExc_PingNoReplyError; +extern PyObject* PyExc_PingError; +extern PyObject* PyExc_PingAddHostError; +extern PyObject* PyExc_PingNoReplyError; typedef struct { PyObject_HEAD @@ -77,7 +77,7 @@ typedef struct { } stats; } PingObject; -PyTypeObject PingType; +extern PyTypeObject PingType; void Ping_dealloc(PingObject* self); void Ping_init_stats(PingObject* self); @@ -99,7 +99,7 @@ typedef struct { const sensors_feature* feature; } SensorObject; -PyTypeObject SensorType; +extern PyTypeObject SensorType; void Sensor_dealloc(SensorObject* self); PyObject* Sensor_new(PyTypeObject* type, PyObject* args, PyObject* kwds);