diff options
Diffstat (limited to 'python-ethtool/etherinfo_struct.h')
-rw-r--r-- | python-ethtool/etherinfo_struct.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python-ethtool/etherinfo_struct.h b/python-ethtool/etherinfo_struct.h index b1d453f..3ae037f 100644 --- a/python-ethtool/etherinfo_struct.h +++ b/python-ethtool/etherinfo_struct.h @@ -87,6 +87,6 @@ typedef struct { * * @return Returns a PyObject with either the input string wrapped up, or a Python None value. */ -#define RETURN_STRING(str) (str ? PyString_FromString(str) : Py_None) +#define RETURN_STRING(str) (str ? PyString_FromString(str) : (Py_INCREF(Py_None), Py_None)) #endif |