summaryrefslogtreecommitdiff
path: root/usr/src/lib/pyzfs/common/ioctl.c
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2020-01-16 12:19:33 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2020-01-16 12:19:33 +0000
commitd3f83376d2ed784ca0a6ba3d8cd1fdaee338f1c4 (patch)
treef5da272fde15217209aa45ff8a07779656164933 /usr/src/lib/pyzfs/common/ioctl.c
parentf634d1677b30daf0327321f2f1f01ea3686f422c (diff)
parent6554ec17858060401cf0f52e78b57fec69f7842d (diff)
downloadillumos-joyent-release-20200116.tar.gz
[illumos-gate merge]release-20200116
commit 6554ec17858060401cf0f52e78b57fec69f7842d 12195 acpidump failed under EFI commit 00f7aa5b4350768e529a41a31488f44902224fcf 12186 The n2rng man page incorrectly refers to n2cp commit 005be40cf09c8b0bcf2de631893dae837ff4cb8a 12188 libfmd_adm: Wrong prerequisites for generated files commit b0858fdc3790ef1d1f955bd584621c6fd539050d 11522 illumos-gate has some runtime dependencies on Python 2.7 12192 python3 modules treat strings incorrectly
Diffstat (limited to 'usr/src/lib/pyzfs/common/ioctl.c')
-rw-r--r--usr/src/lib/pyzfs/common/ioctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/lib/pyzfs/common/ioctl.c b/usr/src/lib/pyzfs/common/ioctl.c
index 55c03fc2b8..a931a7bb69 100644
--- a/usr/src/lib/pyzfs/common/ioctl.c
+++ b/usr/src/lib/pyzfs/common/ioctl.c
@@ -144,7 +144,7 @@ dict2nvl(PyObject *d)
while (PyDict_Next(d, &pos, &key, &value)) {
#if PY_MAJOR_VERSION >= 3
- char *keystr = PyBytes_AsString(key);
+ char *keystr = PyUnicode_AsUTF8(key);
#else
char *keystr = PyString_AsString(key);
#endif
@@ -161,12 +161,12 @@ dict2nvl(PyObject *d)
} else if (value == Py_None) {
err = nvlist_add_boolean(nvl, keystr);
#if PY_MAJOR_VERSION >= 3
- } else if (PyBytes_Check(value)) {
+ } else if (PyUnicode_Check(value)) {
#else
} else if (PyString_Check(value)) {
#endif
#if PY_MAJOR_VERSION >= 3
- char *valstr = PyBytes_AsString(value);
+ char *valstr = PyUnicode_AsUTF8(value);
#else
char *valstr = PyString_AsString(value);
#endif