From: Neal Norwitz <nnorwitz@gmail.com> Date: Thu, 23 Aug 2007 20:28:10 +0000 (+0000) Subject: Use unicode. X-Git-Tag: v3.0a1~315 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6d2f2f93919d035929ac9d02244657a9b604413;p=python Use unicode. --- diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index e6ac1540b2..7d45e57e0e 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -215,7 +215,7 @@ EVP_repr(PyObject *self) { char buf[100]; PyOS_snprintf(buf, sizeof(buf), "<%s HASH object @ %p>", - PyString_AsString(((EVPobject *)self)->name), self); + PyUnicode_AsString(((EVPobject *)self)->name), self); return PyUnicode_FromString(buf); } @@ -416,7 +416,7 @@ EVP_new(PyObject *self, PyObject *args, PyObject *kwdict) /* used in the init function to setup a constructor */ #define INIT_CONSTRUCTOR_CONSTANTS(NAME) do { \ - CONST_ ## NAME ## _name_obj = PyString_FromString(#NAME); \ + CONST_ ## NAME ## _name_obj = PyUnicode_FromString(#NAME); \ if (EVP_get_digestbyname(#NAME)) { \ CONST_new_ ## NAME ## _ctx_p = &CONST_new_ ## NAME ## _ctx; \ EVP_DigestInit(CONST_new_ ## NAME ## _ctx_p, EVP_get_digestbyname(#NAME)); \