diff options
Diffstat (limited to 'PC/_msi.c')
-rw-r--r-- | PC/_msi.c | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -18,7 +18,7 @@ static PyObject* uuidcreate(PyObject* obj, PyObject*args) { UUID result; - unsigned short *cresult; + wchar_t *cresult; PyObject *oresult; /* May return ok, local only, and no address. @@ -35,7 +35,7 @@ uuidcreate(PyObject* obj, PyObject*args) return NULL; } - oresult = PyUnicode_FromUnicode(cresult, wcslen(cresult)); + oresult = PyUnicode_FromWideChar(cresult, wcslen(cresult)); RpcStringFreeW(&cresult); return oresult; @@ -122,7 +122,9 @@ static FNFCIGETTEMPFILE(cb_gettempfile) static FNFCISTATUS(cb_status) { if (pv) { - PyObject *result = PyObject_CallMethod(pv, "status", "iii", typeStatus, cb1, cb2); + _Py_IDENTIFIER(status); + + PyObject *result = _PyObject_CallMethodId(pv, &PyId_status, "iii", typeStatus, cb1, cb2); if (result == NULL) return -1; Py_DECREF(result); @@ -133,7 +135,9 @@ static FNFCISTATUS(cb_status) static FNFCIGETNEXTCABINET(cb_getnextcabinet) { if (pv) { - PyObject *result = PyObject_CallMethod(pv, "getnextcabinet", "i", pccab->iCab); + _Py_IDENTIFIER(getnextcabinet); + + PyObject *result = _PyObject_CallMethodId(pv, &PyId_getnextcabinet, "i", pccab->iCab); if (result == NULL) return -1; if (!PyBytes_Check(result)) { @@ -375,7 +379,7 @@ record_getstring(msiobj* record, PyObject* args) } if (status != ERROR_SUCCESS) return msierror((int) status); - string = PyUnicode_FromUnicode(res, size); + string = PyUnicode_FromWideChar(res, size); if (buf != res) free(res); return string; @@ -397,7 +401,7 @@ record_setstring(msiobj* record, PyObject *args) { int status; int field; - Py_UNICODE *data; + wchar_t *data; if (!PyArg_ParseTuple(args, "iu:SetString", &field, &data)) return NULL; @@ -414,7 +418,7 @@ record_setstream(msiobj* record, PyObject *args) { int status; int field; - Py_UNICODE *data; + wchar_t *data; if (!PyArg_ParseTuple(args, "iu:SetStream", &field, &data)) return NULL; |