Use unicode for password modules

This commit is contained in:
Neal Norwitz 2007-08-24 23:26:23 +00:00
parent 6e024b3842
commit eb8b3a6d61
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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);