Kaydet (Commit) eb8b3a6d authored tarafından Neal Norwitz's avatar Neal Norwitz

Use unicode for password modules

üst 6e024b38
......@@ -46,10 +46,10 @@ static int initialized;
static PyTypeObject StructPwdType;
static void
sets(PyObject *v, int i, char* val)
sets(PyObject *v, int i, const char* val)
{
if (val)
PyStructSequence_SET_ITEM(v, i, PyString_FromString(val));
PyStructSequence_SET_ITEM(v, i, PyUnicode_FromString(val));
else {
PyStructSequence_SET_ITEM(v, i, Py_None);
Py_INCREF(Py_None);
......
......@@ -57,10 +57,10 @@ static PyTypeObject StructSpwdType;
static void
sets(PyObject *v, int i, char* val)
sets(PyObject *v, int i, const char* val)
{
if (val)
PyStructSequence_SET_ITEM(v, i, PyString_FromString(val));
PyStructSequence_SET_ITEM(v, i, PyUnicode_FromString(val));
else {
PyStructSequence_SET_ITEM(v, i, Py_None);
Py_INCREF(Py_None);
......
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