commit | 728eba9b62cb3608d6ff73ab0545ceb940301078 | [log] [tgz] |
---|---|---|
author | Jean-Paul Calderone <exarkun@divmod.com> | Thu Aug 12 20:17:59 2010 -0400 |
committer | Jean-Paul Calderone <exarkun@divmod.com> | Thu Aug 12 20:17:59 2010 -0400 |
tree | f0708e9ae468db93b487584a7befd3d89d192589 | |
parent | 072195d56591c82654800a46e86c8637131443b5 [diff] [blame] |
Handle the difference between PyNumber_ToBase(16) and PyString_Format("%x")
diff --git a/OpenSSL/util.c b/OpenSSL/util.c index 76a4a25..661bb1d 100644 --- a/OpenSSL/util.c +++ b/OpenSSL/util.c
@@ -77,6 +77,14 @@ goto err; } +#ifdef PY3 + { + PyObject *hexbytes = PyUnicode_AsASCIIString(hex); + Py_DECREF(hex); + hex = hexbytes; + } +#endif + return hex; err: