diff options
author | David Sommerseth <davids@redhat.com> | 2013-12-20 01:46:01 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2013-12-20 01:46:01 +0100 |
commit | d4bc3a50bb6124a0000879f27d43e9685934d682 (patch) | |
tree | 90bba459968245d81f7b76a67d8f6e6b20d1b889 /python-ethtool/ethtool.c | |
parent | 50704634080bb653e899ff4a1d730968fb731398 (diff) | |
download | python-ethtool-d4bc3a50bb6124a0000879f27d43e9685934d682.tar.gz python-ethtool-d4bc3a50bb6124a0000879f27d43e9685934d682.tar.xz python-ethtool-d4bc3a50bb6124a0000879f27d43e9685934d682.zip |
Make the device string a python object as well
This will simplify to "pythonize" struct etherinfo further.
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'python-ethtool/ethtool.c')
-rw-r--r-- | python-ethtool/ethtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python-ethtool/ethtool.c b/python-ethtool/ethtool.c index 7d2a243..e37bcf1 100644 --- a/python-ethtool/ethtool.c +++ b/python-ethtool/ethtool.c @@ -281,7 +281,7 @@ static PyObject *get_interfaces_info(PyObject *self __unused, PyObject *args) { /* Store the device name and a reference to the NETLINK connection for * objects to use when quering for device info */ - ethinfo->device = strdup(fetch_devs[i]); + ethinfo->device = PyString_FromString(fetch_devs[i]); ethinfo->index = -1; /* Instantiate a new etherinfo object with the device information */ |