diff options
author | David Sommerseth <davids@redhat.com> | 2009-09-07 17:35:54 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2009-09-07 17:35:54 +0200 |
commit | b74c47dc5ea7211460bfa700bf8ee910f5a27dc6 (patch) | |
tree | ffff897efa5c646f55cb8ee730229204284aaf47 | |
parent | 38a0b2a9adab72a39039cd2a7dffb72120846ad1 (diff) | |
download | python-ethtool-b74c47dc5ea7211460bfa700bf8ee910f5a27dc6.tar.gz python-ethtool-b74c47dc5ea7211460bfa700bf8ee910f5a27dc6.tar.xz python-ethtool-b74c47dc5ea7211460bfa700bf8ee910f5a27dc6.zip |
Changed the RETURN_STRING() macro to return None instead of False, to make it more Pythonish
-rw-r--r-- | python-ethtool/etherinfo_obj.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python-ethtool/etherinfo_obj.c b/python-ethtool/etherinfo_obj.c index 264a823..ebdda80 100644 --- a/python-ethtool/etherinfo_obj.c +++ b/python-ethtool/etherinfo_obj.c @@ -68,13 +68,13 @@ int _ethtool_etherinfo_init(etherinfo_py *self, PyObject *args, PyObject *kwds) } /** - * Null safe PyString_FromString() wrapper. If input string is NULL, a False value will be returned + * NULL safe PyString_FromString() wrapper. If input string is NULL, None will be returned * * @param str Input C string (char *) * - * @return Returns a PyObject with either the input string wrapped up, or a Python False value. + * @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_False); +#define RETURN_STRING(str) (str ? PyString_FromString(str) : Py_None); /** * ethtool.etherinfo function for retrieving data from a Python object. |