Commit 704d8b15 authored by Martin v. Löwis's avatar Martin v. Löwis

Port GetInteger and GetString to 3k.

parent 0f599891
...@@ -351,7 +351,7 @@ record_getinteger(msiobj* record, PyObject* args) ...@@ -351,7 +351,7 @@ record_getinteger(msiobj* record, PyObject* args)
PyErr_SetString(MSIError, "could not convert record field to integer"); PyErr_SetString(MSIError, "could not convert record field to integer");
return NULL; return NULL;
} }
return PyInt_FromLong((long) status); return PyLong_FromLong((long) status);
} }
static PyObject* static PyObject*
...@@ -375,7 +375,7 @@ record_getstring(msiobj* record, PyObject* args) ...@@ -375,7 +375,7 @@ record_getstring(msiobj* record, PyObject* args)
} }
if (status != ERROR_SUCCESS) if (status != ERROR_SUCCESS)
return msierror((int) status); return msierror((int) status);
string = PyString_FromString(res); string = PyUnicode_FromString(res);
if (buf != res) if (buf != res)
free(res); free(res);
return string; return string;
......
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