Skip to content

Commit b74c47d

Browse files
author
David Sommerseth
committed
Changed the RETURN_STRING() macro to return None instead of False, to make it more Pythonish
1 parent 38a0b2a commit b74c47d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python-ethtool/etherinfo_obj.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ int _ethtool_etherinfo_init(etherinfo_py *self, PyObject *args, PyObject *kwds)
6868
}
6969

7070
/**
71-
* Null safe PyString_FromString() wrapper. If input string is NULL, a False value will be returned
71+
* NULL safe PyString_FromString() wrapper. If input string is NULL, None will be returned
7272
*
7373
* @param str Input C string (char *)
7474
*
75-
* @return Returns a PyObject with either the input string wrapped up, or a Python False value.
75+
* @return Returns a PyObject with either the input string wrapped up, or a Python None value.
7676
*/
77-
#define RETURN_STRING(str) (str ? PyString_FromString(str) : Py_False);
77+
#define RETURN_STRING(str) (str ? PyString_FromString(str) : Py_None);
7878

7979
/**
8080
* ethtool.etherinfo function for retrieving data from a Python object.

0 commit comments

Comments
 (0)