]> git.ipfire.org Git - collecty.git/commitdiff
python: Make python types extern
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 1 Dec 2021 19:40:00 +0000 (19:40 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 1 Dec 2021 19:40:00 +0000 (19:40 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/_collecty/_collectymodule.h

index 56282f1c9567df46e2b754192c50ea90108246b5..bbbe8e23562858bb21232859f2925fd15ade5e3b 100644 (file)
@@ -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);