Unverified Commit 39c475a9 by Victor M. Alvarez Committed by GitHub

Fix memory leak. (#94)

Closes issue #79.
parent a7327027
......@@ -47,8 +47,7 @@ typedef long Py_hash_t;
#if PY_MAJOR_VERSION >= 3
#define PY_STRING(x) PyUnicode_FromString(x)
#define PY_STRING_TO_C(x) PyBytes_AsString(\
PyUnicode_AsEncodedString(x, "utf-8", "strict"))
#define PY_STRING_TO_C(x) PyUnicode_AsUTF8(x)
#define PY_STRING_CHECK(x) PyUnicode_Check(x)
#else
#define PY_STRING(x) PyString_FromString(x)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment