From eb8b3a6d61860cdbf52af6e82b44925b81bb39b1 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Fri, 24 Aug 2007 23:26:23 +0000 Subject: Use unicode for password modules --- Modules/pwdmodule.c | 4 ++-- Modules/spwdmodule.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c index 9e01f48..ea8c19c 100644 --- a/Modules/pwdmodule.c +++ b/Modules/pwdmodule.c @@ -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); diff --git a/Modules/spwdmodule.c b/Modules/spwdmodule.c index d3f309a..9dd17e4 100644 --- a/Modules/spwdmodule.c +++ b/Modules/spwdmodule.c @@ -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); -- cgit v0.12