Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 704d8b1

Browse files
committed
Port GetInteger and GetString to 3k.
1 parent 0f59989 commit 704d8b1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

PC/_msi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ record_getinteger(msiobj* record, PyObject* args)
351351
PyErr_SetString(MSIError, "could not convert record field to integer");
352352
return NULL;
353353
}
354-
return PyInt_FromLong((long) status);
354+
return PyLong_FromLong((long) status);
355355
}
356356

357357
static PyObject*
@@ -375,7 +375,7 @@ record_getstring(msiobj* record, PyObject* args)
375375
}
376376
if (status != ERROR_SUCCESS)
377377
return msierror((int) status);
378-
string = PyString_FromString(res);
378+
string = PyUnicode_FromString(res);
379379
if (buf != res)
380380
free(res);
381381
return string;

0 commit comments

Comments
 (0)